#63 vertical fill bar indicator

This commit is contained in:
Mikayla Fischler
2022-06-09 10:18:37 -04:00
parent 307883e6e7
commit 11e4d89b1d
3 changed files with 89 additions and 1 deletions

View File

@@ -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)