Merge text.love
[?]
Mar 19, 2023, 7:04 AM
QF3HGULONECPRBR4K4IEA5TQQLCIPQWADAKXNSPFQFBPOEK5A4LQCDependencies
- [2]
3G723RV5Merge text.love - [3]
JKENJ2UGMerge lines.love - [4]
2L5MEZV3experiment: new edit namespace - [5]
TGZAJUEFbring back a set of constants - [6]
T4FRZSYLdelete an ancient, unused file - [7]
ECBDENZ4Merge text.love - [8]
ORKN6EOBMerge lines.love - [9]
VHQCNMARseveral more modules - [10]
36Z442IVback to commit 8123959e52f without code editing - [11]
ZJOSQFN6bugfix: path munging on Windows - [12]
UAYCSFSKMerge text.love - [13]
GTRSST7Pmove default file location - [14]
AYX33NBCMerge lines.love - [15]
K74U4BAUMerge lines.love - [16]
D2GCFTTTclean up repl functionality - [17]
OGUV4HSAremove some memory leaks from rendered fragments - [18]
UHB4GARJleft/right margin -> left/right coordinates - [19]
A4BSGS2CMerge lines.love - [20]
LF7BWEG4group all editor globals - [21]
4SR3Z4Y3document the version of LÖVE I've been using - [22]
R5QXEHUIsomebody stop me - [23]
CE4LZV4Tdrop last couple of manual tests - [24]
JCXL74WVbring back everything from commit a68647ae22 - [25]
C3GUE45IMerge text.love - [26]
D76MS2G2Merge lines.love - [27]
BLWAYPKVextract a module - [28]
K2X6G75Zstart writing some tests for drawings - [29]
W5H5YI6SMerge text.love - [30]
BULPIBEGbeginnings of a module for the text editor - [31]
DUHVCYW5Merge text.love - [32]
XX7G2FFJintermingle freehand line drawings with text - [33]
GUOQRUL7Merge lines.love - [34]
TVCPXAAUrename - [35]
73OCE2MCafter much struggle, a brute-force undo - [36]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [37]
KKMFQDR4editing source code from within the app - [38]
DB7HJBHJMerge lines.love - [39]
TLOAPLBJadd a license - [40]
JOPVPUSAediting source code from within the app - [41]
6LJZN727handle chords - [42]
QS3YLNKZMerge lines.love - [43]
RSZD5A7Gforgot to add json.lua - [44]
FS2ITYYHrecord a known issue - [45]
VXORMHMEdelete experimental REPL - [46]
LXTTOB33extract a couple of files - [47]
R56CKHYZMerge text.love - [48]
MD3W5IRAnew fork: rip out drawing support - [49]
66X36NZNa little more prose describing manual_tests - [50]
DCO5BQWVMerge lines.love - [51]
EX43CDDIMerge text.love - [52]
3PSFWAILMerge lines.love - [53]
OTIBCAUJlove2d scaffold - [54]
2TQUKHBCMerge lines.love - [55]
AVTNUQYRbasic test-enabled framework - [56]
RXNR3U5EMerge text.love - [57]
KMSL74GAsupport selections in the source editor - [58]
2CTN2IEFMerge lines.love - [59]
ZTZOO2OQMerge lines.love - [60]
3QNOKBFMbeginnings of a test harness - [61]
ETXNVRPTMerge lines.love - [62]
VHUNJHXBMerge lines.love - [63]
VP5KC4XZMerge lines.love - [64]
ATQO62TFMerge lines.love - [65]
4YDBYBA4clean up memory leak experiments
Change contents
- file deletion: source.lua source.lua
local os = love.system.getOS()if os == 'Android' or os == 'iOS' then-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7-- no point second-guessing window dimensions on mobileApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()returnend-- maximize window-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.App.screen.move(settings.x, settings.y-37, settings.displayindex)endfunction source.initialize_default_settings()local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))local em = App.newText(love.graphics.getFont(), 'm')source.initialize_window_geometry(App.width(em))Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right)-- maximize window to determine maximum allowable dimensionsApp.screen.resize(0, 0) -- maximizeDisplay_width, Display_height, App.screen.flags = App.screen.size()-- set up desired window dimensionsApp.screen.flags.resizable = trueApp.screen.flags.minwidth = math.min(Display_width, 200)App.screen.flags.minheight = math.min(Display_height, 200)App.screen.width, App.screen.height = settings.width, settings.height--? print('setting window from settings:', App.screen.width, App.screen.height)App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)endfunction source.set_window_position_from_settings(settings)endendfunction source.resize_window_from_settings(settings)local os = love.system.getOS()if os == 'Android' or os == 'iOS' then-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7-- no point second-guessing window dimensions on mobileApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()returnendsource.resize_window_from_settings(settings)--? print('loading source position', settings.x, settings.y, settings.displayindex)source.set_window_position_from_settings(settings)Show_log_browser_side = settings.show_log_browser_sidelocal right = App.screen.width - Margin_rightif Show_log_browser_side thenright = App.screen.width/2 - Margin_rightendEditor_state = edit.initialize_state(Margin_top, Margin_left, right, settings.font_height, math.floor(settings.font_height*1.3))Editor_state.filename = settings.filename - file deletion: run.lua run.lua
Settings.x, Settings.y, Settings.displayindex = App.screen.position()endApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)endfunction run.resize(w, h)--? print(("Window resized to width: %d and height: %d."):format(w, h))App.screen.width, App.screen.height = w, hText.redraw_all(Editor_state)Editor_state.selection1 = {} -- no support for shift drag while we're resizingEditor_state.right = App.screen.width-Margin_rightEditor_state.width = Editor_state.right-Editor_state.leftText.tweak_screen_top_and_cursor(Editor_state, Editor_state.left, Editor_state.right)endApp.screen.resize(0, 0) -- maximizeApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()-- shrink height slightly to account for window decorationApp.screen.height = App.screen.height-100App.screen.width = 40*em_widthApp.screen.flags.resizable = trueApp.screen.flags.minwidth = math.min(App.screen.width, 200)local os = love.system.getOS()if os == 'Android' or os == 'iOS' then-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7-- no point second-guessing window dimensions on mobileApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()returnend-- maximize windowApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)App.screen.move(Settings.x, Settings.y, Settings.displayindex)Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, Settings.font_height, math.floor(Settings.font_height*1.3))Editor_state.filename = Settings.filenameEditor_state.screen_top1 = Settings.screen_topEditor_state.cursor1 = Settings.cursorendfunction run.initialize_default_settings()local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))local em = App.newText(love.graphics.getFont(), 'm')run.initialize_window_geometry(App.width(em))Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right)Editor_state.font_height = font_heightEditor_state.line_height = math.floor(font_height*1.3)Editor_state.em = emSettings = run.settings()endfunction run.initialize_window_geometry(em_width)App.screen.width, App.screen.height, App.screen.flags = App.screen.size()-- set up desired window dimensions - replacement in main.lua at line 72
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()App.screen.width, App.screen.height, App.screen.flags = App.screen.size() - replacement in main.lua at line 78
love.window.setMode(App.screen.width, App.screen.height, App.screen.flags)love.window.setPosition(settings.x, settings.y, settings.displayindex)App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)App.screen.move(settings.x, settings.y, settings.displayindex) - edit in main.lua at line 98
local os = love.system.getOS()if os == 'Android' or os == 'iOS' then-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7-- no point second-guessing window dimensions on mobileApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()returnend - replacement in main.lua at line 106
love.window.setMode(0, 0) -- maximizeApp.screen.width, App.screen.height, App.screen.flags = love.window.getMode()App.screen.resize(0, 0) -- maximizeApp.screen.width, App.screen.height, App.screen.flags = App.screen.size() - replacement in main.lua at line 114
love.window.setMode(App.screen.width, App.screen.height, App.screen.flags)App.screen.resize(App.screen.width, App.screen.height, App.screen.flags) - replacement in main.lua at line 161
local x,y,displayindex = love.window.getPosition()local x,y,displayindex = App.screen.position() - edit in edit.lua at line 67
filename = love.filesystem.getUserDirectory()..'/lines.txt', -- '/' should work even on Windows