28 lines
		
	
	
		
			719 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
		
		
			
		
	
	
			28 lines
		
	
	
		
			719 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
|  | 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) |