flip return value of button handlers
[?]
Aug 23, 2022, 6:43 PM
K6DTOGOQG4YXWTFKHGZ3DIC23G5ZV3WQZQPRRDYIWEGLNQW6QDGQCDependencies
- [2]
PP2IIHL6stop putting button state in a global - [3]
WJBZZQE4fold together two largely similar cases - [4]
2L5MEZV3experiment: new edit namespace - [5]
U76D4P36fix a typo - [6]
LNUHQOGHstart passing in Editor_state explicitly - [7]
OAHNWDYG. - [8]
ZNLTRNNKhighlight another global - [9]
XX7G2FFJintermingle freehand line drawings with text - [10]
ILOA5BYFseparate data structure for each line's cache data - [11]
6D5MOJS4allow buttons to interrupt events - [12]
BJ46QVIPimprove explanation for buttons - [13]
TGHAJBESuse line cache for drawings as well - [14]
PW2VGQWNindent
Change contents
- edit in edit.lua at line 166
return true -- don't handle any other events with this mouse button press - replacement in edit.lua at line 211
if propagate_to_button_handlers(State, x,y, mouse_button) thenif mouse_press_consumed_by_any_button_handler(State, x,y, mouse_button) then - replacement in button.lua at line 3
-- If the handler returns true, it'll prevent any further processing of the-- event.-- If any applicable button handler returns true, it'll propagate the click to other handlers. - replacement in button.lua at line 17
function propagate_to_button_handlers(State, x, y, mouse_button)function mouse_press_consumed_by_any_button_handler(State, x, y, mouse_button) - replacement in button.lua at line 24
return ev.onpress1()return not ev.onpress1()