fixed element assertion scope on frame validations

This commit is contained in:
Mikayla Fischler
2023-10-14 11:40:36 -04:00
parent 86e8feaabc
commit 6f1195dded
2 changed files with 5 additions and 5 deletions

View File

@@ -217,10 +217,10 @@ function element.new(args, child_offset_x, child_offset_y)
end
-- check frame
element.assert(f.x >= 1, "frame x not >= 1", 2)
element.assert(f.y >= 1, "frame y not >= 1", 2)
element.assert(f.w >= 1, "frame width not >= 1", 2)
element.assert(f.h >= 1, "frame height not >= 1", 2)
element.assert(f.x >= 1, "frame x not >= 1", 3)
element.assert(f.y >= 1, "frame y not >= 1", 3)
element.assert(f.w >= 1, "frame width not >= 1", 3)
element.assert(f.h >= 1, "frame height not >= 1", 3)
-- create window
protected.window = window.create(self.p_window, f.x, f.y, f.w, f.h, args.hidden ~= true)