#63 vertical fill bar indicator
This commit is contained in:
@@ -32,6 +32,7 @@ function element.new(args)
|
||||
-- get the parent window
|
||||
self.p_window = args.window or args.parent.window()
|
||||
|
||||
-- check window
|
||||
assert(self.p_window, "graphics.element: no parent window provided")
|
||||
|
||||
-- get frame coordinates/size
|
||||
@@ -48,6 +49,12 @@ function element.new(args)
|
||||
protected.frame.h = args.height or h
|
||||
end
|
||||
|
||||
-- check frame
|
||||
assert(protected.frame.x >= 1, "graphics.element: frame x not >= 1")
|
||||
assert(protected.frame.y >= 1, "graphics.element: frame y not >= 1")
|
||||
assert(protected.frame.w >= 1, "graphics.element: frame width not >= 1")
|
||||
assert(protected.frame.h >= 1, "graphics.element: frame height not >= 1")
|
||||
|
||||
-- create window
|
||||
local f = protected.frame
|
||||
protected.window = window.create(self.p_window, f.x, f.y, f.w, f.h, true)
|
||||
|
||||
Reference in New Issue
Block a user