edit in main.lua at line 42
+ -- Current_app =
+ -- | run
+ -- | source
+ -- | {name=warning message='...' next_app = run|source}
+
replacement in main.lua at line 74
− elseif Current_app == 'error' then
+ elseif current_app_is_warning() then
replacement in main.lua at line 88
[3.186894]→[3.38:75](∅→∅) − elseif Current_app == 'error' then
+ elseif current_app_is_warning() then
replacement in main.lua at line 104
− -- 'error', and immediately rolls back out of 'error' in the key_release
− -- event.
+ -- 'warning', and immediately rolls back out of 'warning' in the
+ -- key_release event.
edit in main.lua at line 109
−
− -- Where to go from 'error' app.
− Next_app = nil
replacement in main.lua at line 128
[3.187263]→[3.76:113](∅→∅) − elseif Current_app == 'error' then
+ elseif current_app_is_warning() then
replacement in main.lua at line 138
[2.785]→[2.785:1031](∅→∅) − Next_app = Current_app
− Current_app = 'error'
− Error_message = ("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1])
+ show_warning(
+ ("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1]))
replacement in main.lua at line 145
[3.187407]→[2.1137:1181](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 157
[3.187701]→[2.1182:1226](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 168
[3.188032]→[2.1227:1271](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 186
− elseif Current_app == 'error' then
+ elseif current_app_is_warning() then
replacement in main.lua at line 190
[3.956]→[3.956:1008](∅→∅) − love.graphics.printf(Error_message, 40,40, 600)
+ love.graphics.printf(Current_app.message, 40,40, 600)
replacement in main.lua at line 198
[3.521]→[2.1272:1316](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 220
[2.1349]→[3.1044:1077](∅→∅),
[3.188858]→[3.1044:1077](∅→∅) − if Current_app == 'error' then
+ if current_app_is_warning() then
replacement in main.lua at line 224
[2.1359]→[2.1359:1409](∅→∅) − Current_app = Next_app
− Next_app = nil
replacement in main.lua at line 243
− elseif Current_app == 'error' then
+ elseif current_app_is_warning() then
replacement in main.lua at line 266
[3.1512]→[3.1180:1224](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 283
[3.57]→[2.1529:1573](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 300
[3.190617]→[3.1270:1314](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 312
[3.190979]→[3.1315:1359](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 323
[3.925]→[3.1360:1404](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
replacement in main.lua at line 334
[3.191282]→[3.1405:1449](∅→∅) − if Current_app == 'error' then return end
+ if current_app_is_warning() then return end
edit in main.lua at line 351
+ end
+
+ function current_app_is_warning()
+ return type(Current_app) == 'table' and Current_app.name == 'warning'
+ end
+
+ function show_warning(message)
+ assert(type(Current_app) == 'string')
+ Current_app = {
+ name = 'warning',
+ message = message,
+ next_app = Current_app,
+ }
edit in main.lua at line 365
+
+ function clear_warning()
+ assert(type(Current_app) == 'table')
+ Current_app = Current_app.next_app
+ end