sokoban.love/0016-on.mouse_press

12 lines
411 B
Plaintext

on.mouse_press = function(x,y, mouse_button)
if mouse_press_consumed_by_any_button_handler(Editor_state, x,y, mouse_button) then
return
end
if on_editor_scrollbar(x,y) then
Editor_scrollbar_drag = true
elseif on_editor_scrollbar_area(x,y) then
-- nothing
elseif x < Editor_state.right + 15 - 5 and y < Editor_state.bottom + 5 + 10 - 5 then
edit.mouse_press(Editor_state, x,y, mouse_button)
end
end