experiment: switch mouse icon over buttons
Dependencies
- [2]
2Y5GGGJ4correct a mis-named threshold - [3]
PP2IIHL6stop putting button state in a global - [*]
2L5MEZV3experiment: new edit namespace - [*]
LF7BWEG4group all editor globals - [*]
LNUHQOGHstart passing in Editor_state explicitly - [*]
PJEQCTBLadd state arg to Drawing.update - [*]
XX7G2FFJintermingle freehand line drawings with text
Change contents
- edit in edit.lua at line 22
Hand_icon = love.mouse.getSystemCursor('hand')Arrow_icon = love.mouse.getSystemCursor('arrow') - edit in edit.lua at line 106
button_handlers = {}, - edit in edit.lua at line 212
local x, y = love.mouse.getPosition()if mouse_hover_on_any_button(State, x,y) thenlove.mouse.setCursor(Hand_icon)elselove.mouse.setCursor(Arrow_icon)end - edit in button.lua at line 18[3.343][9.2405]
endfunction mouse_hover_on_any_button(State, x, y)for _,ev in ipairs(State.button_handlers) doif x>ev.x and x<ev.x+ev.w and y>ev.y and y<ev.y+ev.h thenif ev.onpress1 thenreturn trueendendend