support event handlers
Dependencies
- [2]
OZ42YLXGpop keyboard back up on touchscreens - [3]
FYX6DG22bugfix: stop dragging output scrollbar on mouse up - [4]
ZOLCTAGUget rid of an assertion - [5]
JV27LDDKsliders for font size and color settings - [6]
5RUFNRJOstart of the visual skeleton - [7]
TEDSEOCWsend editor clicks to the left of the scrollbar - [8]
VAVXKWZVaggregate global state inside a 'pane' object - [9]
IP4LD33Dmouse events for scrollbar - [10]
UEG224LHdebug animations - [11]
PRE6XPRNresponsively increase/decrease font height - [12]
Z5M23NTKimplement second, 'output' editor - [13]
ZM7NOBRMnew fork: carousel shell - [*]
R5QXEHUIsomebody stop me - [*]
WR2WMEPEimplement 'Run' button - [*]
RK2ASPN7add lots of buttons to the toolbar
Change contents
- file addition: 0101-on.mouse_wheel_move[15.2]
on.mouse_wheel_move = function(dx,dy)if Show_code then-- nothing yetelse-- editors hiddenif car.mouse_wheel_move then car.mouse_wheel_move(dx,dy) endif car.wheelmoved then car.wheelmoved(dx,dy) endendend - file addition: 0100-car[15.2]
-- Table where any handlers for the current pane will live.car = {} - replacement in 0017-on.mouse_release at line 3[5.5822]→[6.2424:2987](∅→∅),[6.2259]→[6.2424:2987](∅→∅),[6.2987]→[3.61:117](∅→∅),[3.117]→[6.2987:3120](∅→∅),[6.2987]→[6.2987:3120](∅→∅)
if Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, y)Current_pane.editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) thenadjust_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 thenedit.mouse_release(Current_pane.editor_state, x,y, mouse_button)elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, y)Current_pane.output_editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) thenadjust_scrollbar(Current_pane.output_editor_state, y)if Show_code thenif Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, y)Current_pane.editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) thenadjust_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 thenedit.mouse_release(Current_pane.editor_state, x,y, mouse_button)elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, y)Current_pane.output_editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) thenadjust_scrollbar(Current_pane.output_editor_state, y)endelse-- editors hiddenif car.mouse_release then car.mouse_release(x,y, mouse_button) endif car.mousereleased then car.mousereleased(x,y, mouse_button) end - replacement in 0016-on.mouse_press at line 11[5.5962]→[6.3207:3388](∅→∅),[6.1753]→[6.3207:3388](∅→∅),[6.2314]→[6.1530:1543](∅→∅),[6.3388]→[6.1530:1543](∅→∅),[6.1530]→[6.1530:1543](∅→∅),[6.1543]→[6.3389:3501](∅→∅),[6.3501]→[2.62:97](∅→∅),[2.97]→[6.3501:3772](∅→∅),[6.3501]→[6.3501:3772](∅→∅),[6.3772]→[6.2482:2495](∅→∅),[6.2482]→[6.2482:2495](∅→∅)
if on_editor_scrollbar(Current_pane.editor_state, x,y) thenCurrent_pane.editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then-- nothingelseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 thenlove.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) thenCurrent_pane.output_editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) then-- nothingif Show_code thenif on_editor_scrollbar(Current_pane.editor_state, x,y) thenCurrent_pane.editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then-- nothingelseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 thenlove.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) thenCurrent_pane.output_editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) then-- nothingendelse-- editors hiddenif car.mouse_press then car.mouse_press(x,y, mouse_button) endif car.mousepressed then car.mousepressed(x,y, mouse_button) end - replacement in 0015-on.key_release at line 2
if Current_pane.editor_state.cursor_x thenedit.key_release(Current_pane.editor_state, key, scancode)if Show_code thenif Current_pane.editor_state.cursor_x thenedit.key_release(Current_pane.editor_state, key, scancode)endelse-- editors hiddenif car.key_release then car.key_release(key, scancode) endif car.keyreleased then car.keyreleased(key, scancode) end - replacement in 0014-on.text_input at line 2
if Current_pane.editor_state.cursor_x thenedit.text_input(Current_pane.editor_state, t)if Show_code thenif Current_pane.editor_state.cursor_x thenedit.text_input(Current_pane.editor_state, t)endelse-- editors hiddenif car.text_input then car.text_input(t) endif car.textinput then car.textinput(t) end - replacement in 0013-on.keychord_press at line 8
elseif Current_pane.editor_state.cursor_x then-- send keys to editor if cursor is visibleedit.keychord_press(Current_pane.editor_state, chord, key)elseif Show_code thenif Current_pane.editor_state.cursor_x then-- send keys to editor if cursor is visibleedit.keychord_press(Current_pane.editor_state, chord, key)endelse-- editors hiddenif car.keychord_press then car.keychord_press(chord, key) endif car.keypressed then car.keypressed(key) end - edit in 0012-on.draw at line 5[16.905][17.8224]
App.color(Foreground_color)if car.draw then car.draw() end -- off canvas - replacement in 0004-on.update at line 1
on.update = function()on.update = function(dt) - edit in 0004-on.update at line 11
if car.update then car.update(dt) end