diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-12-03 13:01:49 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-12-03 13:01:49 -0800 |
commit | 67eb28ef1c5e7aaeeff540afcb1be00ae4aef239 (patch) | |
tree | e8672ff54c121985b2aaf0fbf7a2c209a2960150 | |
parent | df2cfb820d23e7f5016c5b790d59d5732cb93308 (diff) | |
parent | f6bc670ef689aa6485f3e3ad242efb5271b48f58 (diff) | |
download | view.love-67eb28ef1c5e7aaeeff540afcb1be00ae4aef239.tar.gz |
Merge lines.love
-rw-r--r-- | Manual_tests.md | 3 | ||||
-rw-r--r-- | app.lua | 2 | ||||
-rw-r--r-- | main.lua | 7 |
3 files changed, 8 insertions, 4 deletions
diff --git a/Manual_tests.md b/Manual_tests.md index 2650be8..b6f3c99 100644 --- a/Manual_tests.md +++ b/Manual_tests.md @@ -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 diff --git a/app.lua b/app.lua index 35350d4..e4b67cc 100644 --- a/app.lua +++ b/app.lua @@ -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() diff --git a/main.lua b/main.lua index 7b7bdb7..918d414 100644 --- a/main.lua +++ b/main.lua @@ -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 |