2023-11-15 14:06:56 +00:00
|
|
|
on.mouse_press = function(x,y, mouse_button)
|
2023-11-19 21:15:06 +00:00
|
|
|
if mouse_press_consumed_by_any_button_handler(Global_state, x,y, mouse_button) then
|
2023-11-15 15:04:34 +00:00
|
|
|
return
|
|
|
|
end
|
2023-11-22 20:38:16 +00:00
|
|
|
Show_overflow = false
|
2023-11-21 10:19:56 +00:00
|
|
|
if mouse_on_any_slider(x,y, mouse_button) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
if not on_area(Settings_menu_area, x,y) then
|
|
|
|
Show_settings = false
|
|
|
|
end
|
2023-11-22 03:17:49 +00:00
|
|
|
if Show_code then
|
|
|
|
if on_editor_scrollbar(Current_pane.editor_state, x,y) then
|
|
|
|
Current_pane.editor_state.scrollbar_drag = true
|
|
|
|
elseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then
|
|
|
|
-- nothing
|
|
|
|
elseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 then
|
|
|
|
love.keyboard.setTextInput(true)
|
|
|
|
edit.mouse_press(Current_pane.editor_state, x,y, mouse_button)
|
|
|
|
elseif on_editor_scrollbar(Current_pane.output_editor_state, x,y) then
|
|
|
|
Current_pane.output_editor_state.scrollbar_drag = true
|
|
|
|
elseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) then
|
|
|
|
-- nothing
|
|
|
|
end
|
|
|
|
else
|
|
|
|
-- editors hidden
|
|
|
|
if car.mouse_press then car.mouse_press(x,y, mouse_button) end
|
|
|
|
if car.mousepressed then car.mousepressed(x,y, mouse_button) end
|
2023-11-18 13:26:28 +00:00
|
|
|
end
|
2023-11-15 14:06:56 +00:00
|
|
|
end
|