Merge lines.love

This commit is contained in:
Kartik K. Agaram 2023-12-03 13:01:49 -08:00
commit 67eb28ef1c
3 changed files with 8 additions and 4 deletions

View File

@ -17,6 +17,8 @@ Initializing settings:
- start out editing source, move window, press ctrl+e twice; window is editing source in same position+dimensions
- no log file; switching to source works
- run with an unsupported version. Error message pops up and waits for a key. The app attempts to continue, and doesn't receive the key.
Code loading:
* run love with directory; text editor runs
* run love with zip file; text editor runs
@ -27,6 +29,7 @@ Code loading:
- analogously, how a shape precisely looks as you draw it
* start out running the text editor, press ctrl+e to edit source, make a change to the source, press ctrl+e twice to return to the source editor; the change should be preserved.
* run with an unsupported version. Error message pops up and waits for a key. The app attempts to continue, and doesn't receive the key. Press ctrl+e to edit source. Source editor opens up without checking version.
### Other compromises

View File

@ -8,10 +8,10 @@
-- and a source editor, while giving each the illusion of complete
-- control.
function love.run()
App.version_check()
App.snapshot_love()
-- Tests always run at the start.
App.run_tests_and_initialize()
App.version_check()
--? print('==')
love.timer.step()

View File

@ -75,7 +75,7 @@ function App.version_check()
Error_message = nil
Error_count = 0
-- we'll reuse error mode on load for an initial version check
local supported_versions = {'11.4', '12.0'} -- put the recommended version first
local supported_versions = {'11.5', '11.4', '12.0'} -- put the recommended version first
local minor_version
Major_version, minor_version = love.getVersion()
Version = Major_version..'.'..minor_version
@ -252,13 +252,14 @@ function App.textinput(t)
end
function App.keyreleased(key, scancode)
if Current_app == 'error' then return end
-- ignore events for some time after window in focus (mostly alt-tab)
if Current_time < Last_focus_time + 0.01 then
return
end
--
if Current_app == 'run' then
if Current_app == 'error' then
Current_app = 'run'
elseif Current_app == 'run' then
if run.key_release then run.key_release(key, scancode) end
elseif Current_app == 'source' then
if source.key_release then source.key_release(key, scancode) end