2023-11-15 14:06:56 +00:00
|
|
|
on.mouse_release = function(x,y, mouse_button)
|
2024-01-01 00:21:21 +00:00
|
|
|
if not Show_code then
|
|
|
|
if car.mouse_release then
|
|
|
|
call_protected(car.mouse_release, x,y, mouse_button)
|
|
|
|
end
|
|
|
|
if car.mousereleased then
|
|
|
|
call_protected(car.mousereleased, x,y, mouse_button)
|
|
|
|
end
|
|
|
|
else
|
|
|
|
-- == menu area
|
|
|
|
if Button_pressed then
|
|
|
|
Button_pressed = nil
|
2023-12-03 23:43:27 +00:00
|
|
|
return
|
|
|
|
end
|
2024-01-01 00:21:21 +00:00
|
|
|
-- == settings area
|
|
|
|
Global_state.selected_slider = nil
|
|
|
|
if Show_menu == 'settings' then
|
|
|
|
if on_area(Settings_menu_area, x,y) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-- == main area
|
2023-11-22 03:17:49 +00:00
|
|
|
if Current_pane.editor_state.scrollbar_drag then
|
|
|
|
adjust_scrollbar(Current_pane.editor_state, y)
|
|
|
|
Current_pane.editor_state.scrollbar_drag = nil
|
2023-12-03 01:22:44 +00:00
|
|
|
Current_pane.editor_state.scrollbar_offset = nil
|
2023-11-22 03:17:49 +00:00
|
|
|
elseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then
|
|
|
|
adjust_scrollbar(Current_pane.editor_state, y)
|
|
|
|
elseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 then
|
|
|
|
edit.mouse_release(Current_pane.editor_state, x,y, mouse_button)
|
2024-01-01 06:51:04 +00:00
|
|
|
elseif Output_editor_state.scrollbar_drag then
|
|
|
|
adjust_scrollbar(Output_editor_state, y)
|
|
|
|
Output_editor_state.scrollbar_drag = nil
|
|
|
|
Output_editor_state.scrollbar_offset = nil
|
|
|
|
elseif on_editor_scrollbar_area(Output_editor_state, x,y) then
|
|
|
|
adjust_scrollbar(Output_editor_state, y)
|
2023-11-22 03:17:49 +00:00
|
|
|
end
|
2023-11-18 13:26:28 +00:00
|
|
|
end
|
2023-12-17 07:27:52 +00:00
|
|
|
end
|