做新UI
This commit is contained in:
@@ -14,16 +14,26 @@ namespace NBF
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "MessageBox";
|
||||
|
||||
[AutoFind(Name = "style")]
|
||||
public Controller style;
|
||||
[AutoFind(Name = "back_full")]
|
||||
public GImage back_full;
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "back2")]
|
||||
public GImage back2;
|
||||
[AutoFind(Name = "TextTitle")]
|
||||
public GTextField TextTitle;
|
||||
[AutoFind(Name = "BtnConfirm")]
|
||||
public GButton BtnConfirm;
|
||||
[AutoFind(Name = "BtnClose")]
|
||||
public GButton BtnClose;
|
||||
[AutoFind(Name = "t0")]
|
||||
public Transition t0;
|
||||
[AutoFind(Name = "TextContent")]
|
||||
public GTextField TextContent;
|
||||
[AutoFind(Name = "BtnConfirm1")]
|
||||
public GButton BtnConfirm1;
|
||||
[AutoFind(Name = "BtnCancel")]
|
||||
public GButton BtnCancel;
|
||||
[AutoFind(Name = "BtnConfirm2")]
|
||||
public GButton BtnConfirm2;
|
||||
[AutoFind(Name = "show")]
|
||||
public Transition show;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ UI.Inst.OpenUI<MessageBox>(param); }
|
||||
|
||||
@@ -54,11 +54,12 @@ namespace NBF
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
// TextTitle.SetLanguage(_title);
|
||||
BtnConfirm.SetLanguage(_confirmText);
|
||||
// BtnCancel.SetLanguage(_cancelText);
|
||||
BtnConfirm1.SetLanguage(_confirmText);
|
||||
BtnConfirm2.SetLanguage(_confirmText);
|
||||
BtnCancel.SetLanguage(_cancelText);
|
||||
// MessageStyle.selectedIndex = _style;
|
||||
TextTitle.SetLanguage(_content);
|
||||
TextTitle.SetLanguage(_title);
|
||||
TextContent.SetLanguage(_content);
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
@@ -84,7 +85,7 @@ namespace NBF
|
||||
|
||||
private void OnClick(GComponent btn)
|
||||
{
|
||||
ClosePanel(btn == BtnConfirm);
|
||||
ClosePanel(btn == BtnConfirm1 || btn == BtnConfirm2);
|
||||
}
|
||||
|
||||
private void ClosePanel(bool ret)
|
||||
|
||||
30
Assets/Scripts/UI/TestPanel.Designer.cs
generated
Normal file
30
Assets/Scripts/UI/TestPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary> </summary>
|
||||
public partial class TestPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "TestPanel";
|
||||
|
||||
[AutoFind(Name = "MainMenu")]
|
||||
public MainMenu MainMenu;
|
||||
[AutoFind(Name = "SubMenu")]
|
||||
public CommonSubMenu SubMenu;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ UI.Inst.OpenUI<TestPanel>(param); }
|
||||
|
||||
public static void Hide(){ UI.Inst.HideUI<TestPanel>(); }
|
||||
|
||||
public static void Del(){ UI.Inst.DestroyUI<TestPanel>(); }
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/TestPanel.cs
Normal file
11
Assets/Scripts/UI/TestPanel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class TestPanel : UIPanel
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user