switch all handlers to run either the app or editor
Dependencies
- [2]
SJXIMERStype out a filename to load/save - [3]
VHOJIECSwire up mouse wheel - [4]
OC4P6P36greatly simplify slider implementation - [5]
YSSG2JR6merge bugfix - [6]
I27BLL75new car.quit callback for user scripts - [7]
URM35DJSrip out the canvas - [8]
KCFQO6K5clean up some debug drawing - [9]
IUOZ4YHCuse the obvious name for the font global - [10]
TLOAPLBJadd a license - [11]
D2GCFTTTclean up repl functionality - [12]
IP4LD33Dmouse events for scrollbar - [13]
VHQCNMARseveral more modules - [14]
JV27LDDKsliders for font size and color settings - [15]
4QFVRJ5Uget rid of pane transition animations - [16]
GFBOJWNEresolve conflicts - [17]
CE4LZV4Tdrop last couple of manual tests - [18]
LRDM35CEapp running again - [19]
2CFLXLIEMerge text.love - [20]
LWPFEZBIMerge lines.love - [21]
RVJNNICYbugfix: autosave settings - [22]
T4FRZSYLdelete an ancient, unused file - [23]
7RIDCIVGhandle scripts that change the font - [24]
HVXZLNCCsend errors from event handlers to output editor - [25]
5MEJ7XNHlay out buttons based on device dimensions - [26]
VVGWHJBZfix app identity so successive versions share data - [27]
UEG224LHdebug animations - [28]
G42WRYFRnew handler: mousemoved - [29]
LXTTOB33extract a couple of files - [30]
CAG7PP5YMerge text.love - [31]
RSZD5A7Gforgot to add json.lua - [32]
VEAVIL4Xresize handler - [33]
BQTHWI4Acheck slider state more precisely - [34]
57HKHZ7Zinclude the tool that's mentioned in representation.md - [35]
QD4LOFQRMerge text.love - [36]
KKQKPGCIresolve conflicts - [37]
ADXY3K5Zwire up new-style car.* handlers - [38]
NVZTMKERpartition handlers between screen regions - [39]
4YDBYBA4clean up memory leak experiments - [40]
ZLJYLPOTMerge lines.love - [41]
7JEYXICUresolve conflicts - [42]
RBWTXOQSget rid of example screens - [43]
VXRYVZ74Merge text.love - [44]
JOPVPUSAediting source code from within the app - [45]
VAVXKWZVaggregate global state inside a 'pane' object - [46]
YT7NMQ6Zdelete dead code - [47]
CZQ3NJ4NMerge text0 - [48]
LXR2FNDCresolve conflicts - [49]
W4EQ6IW4simplify state management for menus - [50]
VLTU33KWresolve conflicts - [51]
6LJZN727handle chords - [52]
SIASJPGRsave the list of open files across restart - [53]
4OMG2P5Eisolate editor UI from some app changes - [54]
OJGIQLZWbugfix: only check for settings menu when open - [55]
3PSFWAILMerge lines.love - [56]
TFUNIT6Mresolve conflicts - [57]
KMSL74GAsupport selections in the source editor - [58]
VP5KC4XZMerge lines.love - [59]
FS2ITYYHrecord a known issue - [60]
EZHO4TSWnew file-system format for freewheeling apps - [61]
2L5MEZV3experiment: new edit namespace - [62]
RK2ASPN7add lots of buttons to the toolbar - [63]
GWLETNMWMike's suggested button layout - [64]
QG25UE3Sbugfix: typo X-( - [65]
VXORMHMEdelete experimental REPL - [66]
5LN2NUSEresolve conflicts - [67]
Q6RXCILQMerge text.love - [68]
2DVVKKVAflesh out Readme - [69]
VUF2SX7Bimplement carousel buttons for inserting/switching current pane - [70]
PN6VP3LVescape hatch when print is overridden - [71]
OL7ZCZWDMerge text.love - [72]
BLWAYPKVextract a module - [73]
6VJTQKW7start supporting LÖVE v12 - [74]
AVTNUQYRbasic test-enabled framework - [75]
SIJ5I4NZextract a helper for buttons - [76]
XJX53BE3bugfix: catch errors in mouse_press handlers - [77]
VHUNJHXBMerge lines.love - [78]
SW5GN5LPsuggest a default layout for freewheeling apps - [79]
ZOLCTAGUget rid of an assertion - [80]
I52S4E5Frunning `print` now appends to output editor - [81]
4GX6NAY4some very basic animations for switching panes - [82]
GAKJROFZahh, got the background color sliders working - [83]
2Q437U4Fstarting to experiment with animated pane transitions - [84]
LGIEVJE6activate buttons for some time - [85]
TBTRYEBPMerge lines.love - [86]
GVX7YSQYinitial script after splitting up text-zoom - [87]
WR2WMEPEimplement 'Run' button - [88]
N2NUGNN4include a brief reference enabling many useful apps - [89]
6MQCFHXMremember when someone deletes an example - [90]
R5QXEHUIsomebody stop me - [91]
X2YWEIZSbugfix: missing variable in a button - [92]
OGUV4HSAremove some memory leaks from rendered fragments - [93]
3QNOKBFMbeginnings of a test harness - [94]
ZM7NOBRMnew fork: carousel shell - [95]
ESOJS6ZWextract a function - [96]
PJ5PQAQErecord support for multiple versions - [97]
KKMFQDR4editing source code from within the app - [98]
E75L5QGUok/cancel buttons in file dialog - [99]
73OCE2MCafter much struggle, a brute-force undo - [100]
XX7G2FFJintermingle freehand line drawings with text - [101]
K2X6G75Zstart writing some tests for drawings - [102]
ORKN6EOBMerge lines.love - [103]
TVCPXAAUrename - [104]
SGMA5JLEsave the list of tests in repo - [105]
6RYGW5H3bugfix: output border color - [106]
FPSPT5TMshow current pane number - [107]
YV2GBDNWpreserve settings across restart - [108]
72OBZ3VMbundle support for .wav files - [109]
MZ3DMYPDstart sketching out a scrollbar - [110]
UUAIVZ4U2 bugfixes in font rendering - [111]
CMZDG7CJbugfix: tapping in scrollbar area - [112]
QLJY3CKCbugfix: use border color in scrollbars - [113]
5RUFNRJOstart of the visual skeleton - [114]
ROYQO45Bmount old location of screens if possible - [115]
BULPIBEGbeginnings of a module for the text editor - [116]
ED4Z6ORCcleaner API for file-system access - [117]
6DJMOJKEsupport event handlers - [118]
EHKB76GOUI improvement: more stable scrollbar movement - [119]
2CEAF7YRresolve conflicts - [120]
66X36NZNa little more prose describing manual_tests - [121]
Z5M23NTKimplement second, 'output' editor - [122]
47VXAH2Hdelete some old code - [123]
PRE6XPRNresponsively increase/decrease font height - [124]
QMRQL2FOresolve conflicts - [125]
OGDDLU5Bclose all menus when tapping any button - [126]
D43U7GQ4alter on-disk representation (manifest files) - [127]
RJPNFXVQnew fork: a personal dashboard for mobile devices - [128]
OTIBCAUJlove2d scaffold - [129]
W3RRTO4Pextract a second helper for buttons - [130]
36Z442IVback to commit 8123959e52f without code editing - [131]
4SR3Z4Y3document the version of LÖVE I've been using - [132]
VSGPLJFAresolve conflicts - [133]
FM5LDKGTMerge text.love - [134]
VQYLKEGDhandle still narrower screens on phones - [135]
OOSUBWKXsubject people to a tutorial - [136]
OE26XIQObring back syntax highlighting (but so ugly) - [137]
5OVKHVY6nice way to make on.* handlers more discoverable - [138]
ZENSSO3Dpass remaining love handlers through - [139]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [140]
FIUQJVL2first draft of load/save buttons - [141]
RU4HIK43Merge lines.love - [142]
PUXFYOQ4rename a function
Change contents
- file deletion: 0106-stop_button
stop_button = function(x, y)styled_button('stop', x,y,function()Show_menu = nilclear_handlers()end)if car.quit thencall_protected(car.quit)endlocal w = App.width('stop')+10return x+w+10, yend - file deletion: 0065-hide_code_button
hide_code_button = function(x, y, r)return overflowable_button('hide', x, y, r,function()Show_menu = nilShow_code = falseend)end - file deletion: 0064-show_code_button
show_code_button = function(x, y, r)return overflowable_button('show', x, y, r,function()Show_menu = nilShow_code = trueend)end - file addition: 0158-on.quit[8.2]
on.quit = function()call_protected(car.quit)end - replacement in 0101-on.mouse_wheel_move at line 2
if Show_code thenif App.mouse_y() < Current_pane.editor_state.bottom thenedit.mouse_wheel_move(Current_pane.editor_state, dx,dy)elseedit.mouse_wheel_move(Current_pane.output_editor_state, dx,dy)endelse-- editors hiddenif not Show_code then - edit in 0101-on.mouse_wheel_move at line 9
elseif App.mouse_y() < Current_pane.editor_state.bottom thenedit.mouse_wheel_move(Current_pane.editor_state, dx,dy)elseedit.mouse_wheel_move(Current_pane.output_editor_state, dx,dy)end - edit in 0021-draw_menu at line 14[8.166]→[8.166:189](∅→∅),[8.189]→[8.4375:4455](∅→∅),[8.605]→[8.4375:4455](∅→∅),[8.4455]→[8.284:501](∅→∅),[8.501]→[8.7838:7857](∅→∅),[8.605]→[8.7838:7857](∅→∅),[8.4455]→[8.7838:7857](∅→∅),[8.398]→[8.7838:7857](∅→∅),[8.7857]→[8.4456:4491](∅→∅),[8.4491]→[8.7883:7889](∅→∅),[8.7883]→[8.7883:7889](∅→∅),[8.7889]→[8.4492:4527](∅→∅),[8.4527]→[8.7915:7920](∅→∅),[8.7915]→[8.7915:7920](∅→∅)
x = stop_button(x, y)-- assume screen will always be wide enough to print this far without overflowif not Overflow_button thenlocal w = App.width('code')+10local w2 = App.width('>>')+10if x+w+10+w2+10 < r thenApp.color{r=0.5, g=0.5, b=0.5}love.graphics.print('code', x, y)x = x+w+10endendif Show_code thenx, y = hide_code_button(x, y, r)elsex, y = show_code_button(x, y, r)end - edit in 0021-draw_menu at line 18[8.4587]→[8.4587:4818](∅→∅),[8.4818]→[8.502:516](∅→∅),[8.516]→[8.4850:4861](∅→∅),[8.4850]→[8.4850:4861](∅→∅)
x, y = clear_pane_button(x, y, r)if not Overflow_button thenlocal w = App.width('screen')+10local w2 = App.width('>>')+10if x+w+10+w2+10 < r thenApp.color{r=0.5, g=0.5, b=0.5}love.graphics.print('screen', x, y)x = x+w+10endend - replacement in 0017-on.mouse_release at line 2[8.2259]→[8.66:83](∅→∅),[8.5822]→[8.84:166](∅→∅),[8.166]→[4.1313:1349](∅→∅),[4.1349]→[8.661:694](∅→∅),[8.166]→[8.661:694](∅→∅),[8.694]→[8.23:66](∅→∅),[8.23]→[8.23:66](∅→∅)
-- == menu areaif Button_pressed thenButton_pressed = nilreturnend-- == settings areaGlobal_state.selected_slider = nilif Show_menu == 'settings' thenif on_area(Settings_menu_area, x,y) thenif not Show_code thenif car.mouse_release thencall_protected(car.mouse_release, x,y, mouse_button)endif car.mousereleased thencall_protected(car.mousereleased, x,y, mouse_button)endelse-- == menu areaif Button_pressed thenButton_pressed = nil - replacement in 0017-on.mouse_release at line 15
end-- == main areaif Show_code then-- == settings areaGlobal_state.selected_slider = nilif Show_menu == 'settings' thenif on_area(Settings_menu_area, x,y) thenreturnendend-- == main area - edit in 0017-on.mouse_release at line 38
else-- editors hiddenif car.mouse_release thencall_protected(car.mouse_release, x,y, mouse_button)endif car.mousereleased thencall_protected(car.mousereleased, x,y, mouse_button)end - replacement in 0016-on.mouse_press at line 2[8.2409]→[8.240:257](∅→∅),[8.257]→[8.520:612](∅→∅),[8.2409]→[8.520:612](∅→∅),[8.612]→[5.138:215](∅→∅),[5.215]→[8.258:282](∅→∅),[8.3206]→[8.258:282](∅→∅),[8.282]→[8.5824:5838](∅→∅),[8.3206]→[8.5824:5838](∅→∅),[8.4958]→[8.283:304](∅→∅),[8.304]→[4.1354:1431](∅→∅),[4.1431]→[8.700:733](∅→∅),[8.304]→[8.700:733](∅→∅),[8.733]→[8.327:370](∅→∅),[8.327]→[8.327:370](∅→∅),[8.370]→[4.1432:1497](∅→∅),[8.822]→[8.412:419](∅→∅),[4.1497]→[8.412:419](∅→∅),[8.412]→[8.412:419](∅→∅),[8.419]→[8.734:753](∅→∅),[8.753]→[8.444:589](∅→∅),[8.444]→[8.444:589](∅→∅),[8.589]→[8.106:166](∅→∅),[8.106]→[8.106:166](∅→∅)
-- == menu area-- some hysteresis right after a button has been pressedif Active_button then return endif mouse_press_consumed_by_any_button(Global_state, x,y, mouse_button) thenButton_pressed = truereturnend-- == settings areaif mouse_press_consumed_by_any_slider(Global_state, x,y) thenreturnendif Show_menu == 'settings' thenif on_area(Settings_menu_area, x,y) then-- nothing atm in settings menu that isn't a button or sliderelseShow_menu = nil-- On mobile devices, we can't depend on on.save_settings() triggering on quit.-- So save settings every time we close the settings menu.love.filesystem.write('config', json.encode(settings()))if not Show_code thenif car.mouse_press thencall_protected(car.mouse_press, x,y, mouse_button)endif car.mousepressed thencall_protected(car.mousepressed, x,y, mouse_button)endelse-- == menu area-- some hysteresis right after a button has been pressedif Active_button then return endif mouse_press_consumed_by_any_button(Global_state, x,y, mouse_button) thenButton_pressed = truereturnend-- == settings areaif mouse_press_consumed_by_any_slider(Global_state, x,y) thenreturnendif Show_menu == 'settings' thenif on_area(Settings_menu_area, x,y) then-- nothing atm in settings menu that isn't a button or sliderelseShow_menu = nil-- On mobile devices, we can't depend on on.save_settings() triggering on quit.-- So save settings every time we close the settings menu.love.filesystem.write('config', json.encode(settings()))endreturn - replacement in 0016-on.mouse_press at line 32[8.172]→[8.590:599](∅→∅),[8.599]→[8.5957:5962](∅→∅),[8.5957]→[8.5957:5962](∅→∅),[8.5962]→[8.600:617](∅→∅),[8.617]→[8.754:771](∅→∅),[8.617]→[8.1330:1349](∅→∅),[8.771]→[8.1330:1349](∅→∅),[8.5962]→[8.1330:1349](∅→∅)
returnend-- == main areaShow_menu = nilif Show_code then-- == main areaShow_menu = nil - edit in 0016-on.mouse_press at line 49
endelse-- editors hiddenif car.mouse_press thencall_protected(car.mouse_press, x,y, mouse_button)endif car.mousepressed thencall_protected(car.mousepressed, x,y, mouse_button) - replacement in 0016-on.mouse_press at line 51
end[8.1606]end - edit in 0015-on.key_release at line 7
-- editors hidden - replacement in 0014-on.text_input at line 2
if Show_file_dialog thentext_input_on_file_dialog(t)elseif Show_code thenif Current_pane.editor_state.cursor_x thenif Show_code thenif Show_file_dialog thentext_input_on_file_dialog(t)elseif Current_pane.editor_state.cursor_x then - edit in 0014-on.text_input at line 9
-- editors hidden - replacement in 0013-on.keychord_press at line 2[8.2800]→[8.4016:4042](∅→∅),[8.4042]→[2.2994:3038](∅→∅),[2.3038]→[8.4069:4083](∅→∅),[8.4069]→[8.4069:4083](∅→∅),[8.4083]→[8.2035:2059](∅→∅),[8.2800]→[8.2035:2059](∅→∅),[8.2059]→[8.3882:3946](∅→∅),[8.3946]→[8.2110:2138](∅→∅),[8.2110]→[8.2110:2138](∅→∅),[8.2138]→[8.3947:4011](∅→∅),[8.4011]→[8.2189:2244](∅→∅),[8.2189]→[8.2189:2244](∅→∅),[8.2244]→[8.2669:2846](∅→∅)
if Show_file_dialog thenkeychord_press_on_file_dialog(chord, key)returnendif chord == 'C-=' thenupdate_font_settings(Current_pane.editor_state.font_height+2)elseif chord == 'C--' thenupdate_font_settings(Current_pane.editor_state.font_height-2)elseif chord == 'C-0' thenupdate_font_settings(20)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)if Show_code thenif Show_file_dialog thenkeychord_press_on_file_dialog(chord, key)returnendif chord == 'C-=' thenupdate_font_settings(Current_pane.editor_state.font_height+2)elseif chord == 'C--' thenupdate_font_settings(Current_pane.editor_state.font_height-2)elseif chord == 'C-0' thenupdate_font_settings(20)elseif Current_pane.editor_state.cursor_x then-- send keys to editor if cursor is visibleedit.keychord_press(Current_pane.editor_state, chord, key)end - edit in 0013-on.keychord_press at line 20
-- editors hidden - replacement in 0012-on.draw at line 4[4.1533]→[8.4084:4162](∅→∅),[8.4113]→[8.4084:4162](∅→∅),[8.4162]→[8.4963:4986](∅→∅),[8.4113]→[8.4963:4986](∅→∅),[8.4986]→[8.44:138](∅→∅),[8.4113]→[8.44:138](∅→∅),[8.905]→[8.2992:3021](∅→∅),[8.3021]→[7.0:47](∅→∅),[7.47]→[8.73:102](∅→∅),[8.1893]→[8.73:102](∅→∅),[8.102]→[8.0:56](∅→∅),[8.182]→[8.0:56](∅→∅),[8.1893]→[8.0:56](∅→∅),[8.56]→[8.8224:8243](∅→∅),[8.1893]→[8.8224:8243](∅→∅),[8.3069]→[8.8224:8243](∅→∅),[8.905]→[8.8224:8243](∅→∅)
-- modal dialogif Show_file_dialog thendraw_file_dialog()returnendOverflow_button = nillove.graphics.setBackgroundColor(Background_color.r, Background_color.g, Background_color.b)App.color(Foreground_color)if car.draw then call_protected(car.draw) endlove.graphics.setFont(Font)App.color(Normal_color)love.graphics.setLineWidth(1)if Show_code thenif not Show_code thenif car.draw then call_protected(car.draw) endelse-- modal dialogif Show_file_dialog thendraw_file_dialog()returnendOverflow_button = nillove.graphics.setBackgroundColor(Background_color.r, Background_color.g, Background_color.b)App.color(Foreground_color)-- code editorlove.graphics.setFont(Font)App.color(Normal_color)love.graphics.setLineWidth(1) - edit in 0012-on.draw at line 22
-- output - edit in 0012-on.draw at line 26
-- menu and debug UIdraw_menu()draw_next_frames_of_animations() - edit in 0012-on.draw at line 30[8.2603]→[8.1947:1960](∅→∅),[8.4329]→[8.1947:1960](∅→∅),[8.8579]→[8.1947:1960](∅→∅),[8.1947]→[8.1947:1960](∅→∅),[8.1960]→[8.2189:2223](∅→∅)
draw_menu()draw_next_frames_of_animations() - replacement in 0004-on.update at line 3
-- == menu areaif Active_button and Active_button.expire <= Current_time thenActive_button = nilif not Show_code thenif car.update then call_protected(car.update, dt) endelse-- == menu areaif Active_button and Active_button.expire <= Current_time thenActive_button = nilend-- == settings areaupdate_sliders(Global_state, App.mouse_x())-- == main areaif Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, App.mouse_y())elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, App.mouse_y())end - edit in 0004-on.update at line 19[8.704]→[8.636:657](∅→∅),[8.657]→[4.1534:1596](∅→∅),[8.672]→[8.4658:4898](∅→∅),[4.1596]→[8.4658:4898](∅→∅),[8.6266]→[8.4658:4898](∅→∅),[8.1760]→[8.4658:4898](∅→∅),[8.3026]→[8.1672:1677](∅→∅),[8.4898]→[8.1672:1677](∅→∅),[8.1672]→[8.1672:1677](∅→∅),[8.1677]→[8.1894:1949](∅→∅)
-- == settings areaupdate_sliders(Global_state, App.mouse_x())-- == main areaif Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, App.mouse_y())elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, App.mouse_y())endif car.update then call_protected(car.update, dt) end