diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-09-03 17:26:04 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-09-03 17:26:04 -0700 |
commit | 1eb8b8d9eba68cf7d41fe4c5c72bf8c1f58eda4f (patch) | |
tree | 789d252a5546956700f607bd9faa1ecae98eb4b1 /run.lua | |
parent | 60fe0866dd2926270ab288758dab5f05c96efaab (diff) | |
parent | a92ded7f49121039c2e5a5d8eafd465d8593337b (diff) | |
download | view.love-1eb8b8d9eba68cf7d41fe4c5c72bf8c1f58eda4f.tar.gz |
Merge text.love
Diffstat (limited to 'run.lua')
-rw-r--r-- | run.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/run.lua b/run.lua index d780f3b..4fd7c25 100644 --- a/run.lua +++ b/run.lua @@ -53,12 +53,12 @@ function run.load_settings() -- maximize window to determine maximum allowable dimensions App.screen.width, App.screen.height, App.screen.flags = love.window.getMode() -- set up desired window dimensions - love.window.setPosition(Settings.x, Settings.y, Settings.displayindex) App.screen.flags.resizable = true App.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.height love.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.filename Editor_state.screen_top1 = Settings.screen_top @@ -129,13 +129,15 @@ function run.quit() end function run.settings() - local x,y,displayindex = love.window.getPosition() + if Current_app == 'run' then + Settings.x, Settings.y, Settings.displayindex = love.window.getPosition() + end local filename = Editor_state.filename if filename:sub(1,1) ~= '/' then filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows end return { - x=x, y=y, displayindex=displayindex, + x=Settings.x, y=Settings.y, displayindex=Settings.displayindex, width=App.screen.width, height=App.screen.height, font_height=Editor_state.font_height, filename=filename, |