初始化提交
This commit is contained in:
28
Content/Lua/UI/SettingPanel.lua
Normal file
28
Content/Lua/UI/SettingPanel.lua
Normal file
@ -0,0 +1,28 @@
|
||||
local SettingPanel = {}
|
||||
local UIUtils = require("UI.Utils")
|
||||
local GameplayStatics = import("GameplayStatics")
|
||||
|
||||
function SettingPanel:OnInitialized()
|
||||
self.BtnContinue.OnClicked:Add(function() self:BackToGame() end)
|
||||
self.BtnExitLevel.OnClicked:Add(function() end)
|
||||
self.BtnExitGame.OnClicked:Add(function() self:ExitGame() end)
|
||||
self.BtnClose.OnClicked:Add(function() self:BackToGame() end)
|
||||
end
|
||||
|
||||
function SettingPanel:OnDestroy()
|
||||
|
||||
end
|
||||
|
||||
|
||||
function SettingPanel:BackToGame()
|
||||
GameplayStatics.SetGamePaused(self, false)
|
||||
UIUtils.CloseWidget(self)
|
||||
end
|
||||
|
||||
function SettingPanel:ExitGame()
|
||||
local pc = GameplayStatics.GetPlayerController(self, 0)
|
||||
pc:QuitGame()
|
||||
end
|
||||
|
||||
|
||||
return Class(nil, nil, SettingPanel)
|
||||
Reference in New Issue
Block a user