Add "Quit to desktop" button in pause menu
This commit is contained in:
parent
f32dd594a0
commit
19ae2fdf65
@ -1 +1,2 @@
|
|||||||
require("unlockall")
|
require("unlockall")
|
||||||
|
require("pausequit")
|
||||||
|
10
data/cdata/ui_scripts/patches/pausequit.lua
Normal file
10
data/cdata/ui_scripts/patches/pausequit.lua
Normal 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)
|
Loading…
Reference in New Issue
Block a user