Add "Quit to desktop" button in pause menu

This commit is contained in:
fed 2023-03-10 16:52:07 +01:00
parent f32dd594a0
commit 19ae2fdf65
2 changed files with 11 additions and 0 deletions

View File

@ -1 +1,2 @@
require("unlockall") require("unlockall")
require("pausequit")

View File

@ -0,0 +1,10 @@
if (Engine.InFrontend()) then
return
end
LUI.onmenuopen("sp_pause_menu", function(element)
local menu = element:getFirstChild()
menu:AddButton("@MENU_QUIT_TO_DESKTOP", function()
LUI.FlowManager.RequestAddMenu(nil, "quit_popmenu")
end)
end)