diff --git a/bitplane-thingie.p8 b/bitplane-thingie.p8 index bfa5610..3cb643f 100644 --- a/bitplane-thingie.p8 +++ b/bitplane-thingie.p8 @@ -57,7 +57,7 @@ function _update60() if segment then mouse_y = 111 elseif not was_click then - handle_ui_click(x, y) + handle_ui_click(mouse_x, mouse_y) end end @@ -128,6 +128,15 @@ function draw_ui_checkbox(x, checked, n) end function handle_ui_click(x, y) + -- out of range + if (x < 3 or x > 125) return + + -- nuke button + if x <= 12 and y > 114 and y < 125 then + cls() + return + end + end -->8 -- draw_cursor