主页面
This commit is contained in:
31
Assets/Scripts/UI/Home/HomeButtonGroups.cs
Normal file
31
Assets/Scripts/UI/Home/HomeButtonGroups.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeButtonGroups : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
this.AutoAddClick(OnClick);
|
||||
}
|
||||
|
||||
private void OnClick(GComponent btn)
|
||||
{
|
||||
if (btn == BtnExit)
|
||||
{
|
||||
MessageBox.Show("确定推出到桌面吗?", (b) =>
|
||||
{
|
||||
if (b) Application.Quit();
|
||||
});
|
||||
}
|
||||
else if (btn == BtnSettings)
|
||||
{
|
||||
UI.Inst.OpenUI<SettingPanel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user