Skip to content

Commit 2c3eff7

Browse files
vaisestLocalIdentity
andauthored
Add option to return to build selection when crashing (#2230)
* Add option to return to build selection when crashing * Fix for when a crash occurs in a popup When a crash happened in a popup, it would not clear the popup on pressing f4 so would still be stuck in a crash loop e.g. Crash in the item set manager popup UI We now clear the popup events and input events just incase --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent a1d60e1 commit 2c3eff7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Launch.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ function launch:ShowPrompt(r, g, b, str, func)
357357
self.promptFunc = func or function(key)
358358
if key == "RETURN" or key == "ESCAPE" then
359359
return true
360+
elseif key == "F4" then
361+
if self.main then
362+
self.main.popups = { }
363+
self.main.inputEvents = { }
364+
self.main:SetMode("LIST")
365+
end
366+
return true
360367
elseif key == "c" and IsKeyDown("CTRL") then
361368
local cleanStr = str:gsub("%^%d", "")
362369
Copy(cleanStr)
@@ -372,7 +379,7 @@ function launch:ShowErrMsg(fmt, ...)
372379
local version = self.versionNumber and
373380
"^8v"..self.versionNumber..(self.versionBranch and " "..self.versionBranch or "")
374381
or ""
375-
self:ShowPrompt(1, 0, 0, "^1Error:\n\n^0"..string.format(fmt, ...).."\n"..version.."\n^0Press Enter/Escape to dismiss, or F5 to restart the application.\nPress CTRL + C to copy error text.")
382+
self:ShowPrompt(1, 0, 0, "^1Error:\n\n^0"..string.format(fmt, ...).."\n"..version.."\n^0Press Enter/Escape to dismiss, F4 to return to build selection, or F5 to restart the application.\nPress CTRL + C to copy error text.")
376383
end
377384
end
378385

0 commit comments

Comments
 (0)