yet another fork trying to integrate my live framework with everything else
[?]
Nov 27, 2022, 7:05 PM
YJ6ASFBGEATFRCO2OF2AA4EPOBLWXTIV6YZMHALW3QVR7XTOSJPACDependencies
- [2]
RXNR3U5EMerge text.love - [3]
JCXL74WVbring back everything from commit a68647ae22 - [4]
RF5ALVNYallow the window to be resized - [5]
NEXUNNCFextract a function - [6]
46ASCE5Kfirst commandline arg: window dimensions - [7]
AVQ5MC5Dfinish uppercasing all globals - [8]
YT5P6TO6bugfix: save previous file when dropping a new one on - [9]
UHB4GARJleft/right margin -> left/right coordinates - [10]
KKMFQDR4editing source code from within the app - [11]
2CTN2IEFMerge lines.love - [12]
YGCT2D2Ostart loading settings as applicable - [13]
VNJ2M364bugfix: window title - [14]
WQOSZSUEwarn on unused commandline args - [15]
AJB4LFRBtry to maintain a reasonable line width - [16]
JOPVPUSAediting source code from within the app - [17]
X3CQLBTRset window title within each app - [18]
AKZWDWIAMerge lines.love - [19]
36Z442IVback to commit 8123959e52f without code editing - [20]
APX2PY6Gstop tracking wallclock time - [21]
DCO5BQWVMerge lines.love - [22]
HFI2YR2Crip out geometry commandline arg - [23]
CE4LZV4Tdrop last couple of manual tests - [24]
Z4KNS42Nto open a file without a terminal, drag it on! - [25]
AVTNUQYRbasic test-enabled framework - [26]
XSLCFVFH. - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in main.lua at line 38[4.2502]→[4.2502:2567](∅→∅),[4.2567]→[4.187263:187270](∅→∅),[4.187263]→[4.187263:187270](∅→∅),[4.187270]→[4.2568:2602](∅→∅),[4.2602]→[4.187323:187329](∅→∅),[4.187323]→[4.187323:187329](∅→∅)
if love.filesystem.getInfo('config') thenload_settings()elseinitialize_default_settings()end - replacement in main.lua at line 39[4.1320]→[4.2603:2814](∅→∅),[4.2814]→[4.187568:187575](∅→∅),[4.187568]→[4.187568:187575](∅→∅),[4.187575]→[4.2815:2882](∅→∅),[4.2882]→[4.187628:187634](∅→∅),[4.187628]→[4.187628:187634](∅→∅),[4.187634]→[4.2883:2945](∅→∅)
if #arg > 0 thenEditor_state.filename = arg[1]load_from_disk(Editor_state)Text.redraw_all(Editor_state)Editor_state.screen_top1 = {line=1, pos=1}Editor_state.cursor1 = {line=1, pos=1}elseload_from_disk(Editor_state)Text.redraw_all(Editor_state)endlove.window.setTitle('text.love - '..Editor_state.filename)initialize_default_settings() - replacement in main.lua at line 41
if #arg > 1 thenprint('ignoring commandline args after '..arg[1])end-- TODO: app-specific stuff goes herelove.window.setTitle('TODO') - edit in main.lua at line 50[4.3084]→[4.3084:3422](∅→∅),[4.3495]→[4.3495:3805](∅→∅),[4.3805]→[3.2557:2630](∅→∅),[3.2630]→[4.3805:4099](∅→∅),[4.3805]→[4.3805:4099](∅→∅)
function load_settings()local settings = json.decode(love.filesystem.read('config'))love.graphics.setFont(love.graphics.newFont(settings.font_height))-- maximize window to determine maximum allowable dimensionsApp.screen.width, App.screen.height, App.screen.flags = love.window.getMode()-- set up desired window dimensionsApp.screen.flags.resizable = trueApp.screen.flags.minwidth = math.min(App.screen.width, 200)App.screen.flags.minheight = math.min(App.screen.width, 200)App.screen.width, App.screen.height = settings.width, settings.heightlove.window.setMode(App.screen.width, App.screen.height, App.screen.flags)love.window.setPosition(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.cursorend - edit in main.lua at line 55
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 = em - replacement in main.lua at line 112[4.6189]→[4.6189:6317](∅→∅),[4.6317]→[3.2631:2668](∅→∅),[3.2668]→[4.6352:6770](∅→∅),[4.6352]→[4.6352:6770](∅→∅)
-- save some important settingslocal x,y,displayindex = love.window.getPosition()local filename = Editor_state.filenameif is_relative_path(filename) thenfilename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windowsendlocal settings = {x=x, y=y, displayindex=displayindex,width=App.screen.width, height=App.screen.height,font_height=Editor_state.font_height,filename=filename,screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1}love.filesystem.write('config', json.encode(settings))-- TODO: save settings