Merge text0
[?]
Jul 11, 2023, 2:07 AM
QW7YRY25MDAIA2IZULYIDHEXTI5AHAKNXH4NPQB5W5VMVXJZPQCACDependencies
- [2]
TKRVYAVObugfix for merge commit - [3]
UFOVVX3ZMerge text0 - [4]
NVTUHXC4maintain the initial font size in a global - [5]
FM5LDKGTMerge text.love - [6]
PTOMKY7CMerge text0 - [7]
BF2R2ETDinclude Current_time in reference - [8]
X43ZIKR3Merge text.love - [9]
7RDQRRP5Merge text0 - [10]
KKMFQDR4editing source code from within the app - [11]
W3UFZ4FOrun on.load_settings after loading defaults - [12]
UHB4GARJleft/right margin -> left/right coordinates - [13]
5RLCALX5Merge text0 - [14]
G2SVT3ROMerge text0 - [15]
AVQ5MC5Dfinish uppercasing all globals - [16]
LRDM35CEapp running again - [17]
DD5K2FU2Merge text0 - [18]
2CTN2IEFMerge lines.love - [19]
RXNR3U5EMerge text.love - [20]
YCYCQOFCbugfix: on.load_settings when there are none - [21]
SDRXK4X5move - [22]
R6GUSTBYdefault font size and line-height - [23]
4NUCYNB4Merge text0 - [24]
DUHVCYW5Merge text.love - [25]
XSLCFVFH. - [26]
OI4FPFINsupport drawings in the source editor - [27]
MPETAKZ2insert space for loading settings - [28]
Z4KNS42Nto open a file without a terminal, drag it on! - [29]
AVTNUQYRbasic test-enabled framework - [30]
NEXUNNCFextract a function - [31]
36Z442IVback to commit 8123959e52f without code editing - [32]
HFI2YR2Crip out geometry commandline arg - [33]
JOPVPUSAediting source code from within the app - [34]
G4FCGDN6rename - [35]
HNRU45ZMinline a function - [36]
EADS554Afix previous merge - [37]
DSDKFEUKpersist window geometry to disk across restart - [38]
YGCT2D2Ostart loading settings as applicable - [39]
QF3HGULOMerge text.love - [40]
AJB4LFRBtry to maintain a reasonable line width - [41]
YJ6ASFBGyet another fork trying to integrate my live framework with everything else - [42]
WQOSZSUEwarn on unused commandline args - [43]
JCXL74WVbring back everything from commit a68647ae22 - [44]
FRXBX5FCcreate space for app-specific settings - [45]
46ASCE5Kfirst commandline arg: window dimensions - [46]
N2NUGNN4include a brief reference enabling many useful apps - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in reference.md at line 23
* `Font_height` -- remembers the current font height on initialization. Butyou're responsible for setting it when updating font height. (Think of thisas the body font, but apps so far assume a single font size.) - edit in main.lua at line 38
Font_height = 20 - replacement in main.lua at line 56
load_settings()if love.filesystem.getInfo('config') thenload_settings()elseinitialize_default_settings()end - replacement in main.lua at line 105[6.51]→[6.7:51](∅→∅),[6.51]→[6.253:318](∅→∅),[6.318]→[6.10:61](∅→∅),[6.61]→[6.373:593](∅→∅),[6.373]→[6.373:593](∅→∅),[6.593]→[6.62:206](∅→∅),[6.206]→[6.8:72](∅→∅),[6.747]→[6.8:72](∅→∅),[6.72]→[6.51:58](∅→∅),[6.123]→[6.51:58](∅→∅),[6.747]→[6.51:58](∅→∅),[6.51]→[6.51:58](∅→∅),[6.58]→[4.349:432](∅→∅),[4.432]→[6.10:597](∅→∅),[6.147]→[6.10:597](∅→∅),[6.597]→[2.10:53](∅→∅),[2.53]→[6.678:939](∅→∅),[6.678]→[6.678:939](∅→∅),[6.404]→[6.73:125](∅→∅),[6.939]→[6.73:125](∅→∅),[6.729]→[6.73:125](∅→∅),[6.125]→[6.729:735](∅→∅),[6.729]→[6.729:735](∅→∅)
if love.filesystem.getInfo('config') thenlocal settings = json.decode(love.filesystem.read('config'))local width, height, flags = App.screen.size()flags.resizable = trueflags.minwidth = math.min(width, 200)flags.minheight = math.min(height, 200)App.screen.flags = flagsApp.screen.width = settings.widthApp.screen.height = settings.heightApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)App.screen.move(settings.x, settings.y, settings.displayindex)if on.load_settings then on.load_settings(settings.app) endelseFont_height = 20love.graphics.setFont(love.graphics.newFont(Font_height))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()else-- maximize windowApp.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*App.width('m')App.screen.flags.resizable = trueApp.screen.flags.minwidth = math.min(App.screen.width, 200)App.screen.flags.minheight = math.min(App.screen.height, 200)App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)endif on.load_settings then on.load_settings() endendlocal settings = json.decode(love.filesystem.read('config'))_, _, App.screen.flags = App.screen.size()App.screen.flags.resizable = trueApp.screen.width, App.screen.height = settings.width, settings.heightApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)set_window_position_from_settings(settings)if on.load_settings then on.load_settings(settings.app) end - edit in main.lua at line 114[6.3241]→[5.10:119](∅→∅),[6.3241]→[5.10:119](∅→∅),[6.160]→[5.120:166](∅→∅),[6.160]→[5.120:166](∅→∅),[6.160]→[5.120:166](∅→∅)
-- set up desired window dimensions and make window resizable_, _, App.screen.flags = App.screen.size()set_window_position_from_settings(settings) - resurrect zombie in main.lua at line 114[6.4099]→[5.167:518](∅→∅),[6.4099]→[5.167:518](∅→∅),[6.4099]→[5.167:518](∅→∅),[6.4589]→[5.519:998](∅→∅),[6.4589]→[5.519:998](∅→∅),[6.4589]→[5.519:998](∅→∅)
function set_window_position_from_settings(settings)local os = love.system.getOS()if os == 'Linux' then-- 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)elseApp.screen.move(settings.x, settings.y, settings.displayindex)endend-- Initialize window width/height and make window resizable.---- I get tempted to have opinions about window dimensions here, but they're-- non-portable:-- - maximizing doesn't work on mobile and messes things up-- - maximizing keeps the title bar on screen in Linux, but off screen on-- Windows. And there's no way to get the height of the title bar.-- It seems more robust to just follow LÖVE's default window size until-- someone overrides it. - edit in main.lua at line 122
endfunction initialize_default_settings()local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))initialize_window_geometry(App.width('m')) - edit in main.lua at line 130
function initialize_window_geometry(em_width) - edit in main.lua at line 140
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()App.screen.flags.resizable = trueApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)end