Merge branch 'devel' into front-panels

This commit is contained in:
Mikayla Fischler
2023-05-23 20:25:19 -04:00
5 changed files with 16 additions and 7 deletions

View File

@@ -84,7 +84,7 @@ local function push_button(args)
show_pressed()
elseif event.type == CLICK_TYPE.UP then
show_unpressed()
if e.in_bounds(event.current.x, event.current.y) then
if e.in_frame_bounds(event.current.x, event.current.y) then
args.callback()
end
end

View File

@@ -93,7 +93,7 @@ local function sidebar(args)
elseif event.type == CLICK_TYPE.DOWN then
draw(true, cur_idx)
elseif event.type == CLICK_TYPE.UP then
if cur_idx == ini_idx and e.in_bounds(event.current.x, event.current.y) then
if cur_idx == ini_idx and e.in_frame_bounds(event.current.x, event.current.y) then
e.value = cur_idx
draw(false)
args.callback(e.value)