diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-12-03 13:03:22 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-12-03 13:03:22 -0800 |
commit | 7ff1e4ee114875516ed180f29c5554209c6e38d1 (patch) | |
tree | f64218c45a8334728880d40ce6f2eec8a1797f34 | |
parent | 025237509938fe178f6d9428616243804785fede (diff) | |
parent | 67eb28ef1c5e7aaeeff540afcb1be00ae4aef239 (diff) | |
download | view.love-7ff1e4ee114875516ed180f29c5554209c6e38d1.tar.gz |
Merge text.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 05bb99d..7e06009 100644 --- a/main.lua +++ b/main.lua @@ -74,7 +74,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 @@ -251,13 +251,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 |