相关UILUOJI
This commit is contained in:
35
Assets/Scripts/UI/Common/CommonMenu.Designer.cs
generated
Normal file
35
Assets/Scripts/UI/Common/CommonMenu.Designer.cs
generated
Normal file
@@ -0,0 +1,35 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonMenu
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaufcfggr";
|
||||
|
||||
public GImage LongLine;
|
||||
public GList List;
|
||||
public GButton Head;
|
||||
public GTextField TextName;
|
||||
public GComponent Currency;
|
||||
public GButton BtnClose;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
LongLine = (GImage)GetChild("LongLine");
|
||||
List = (GList)GetChild("List");
|
||||
Head = (GButton)GetChild("Head");
|
||||
TextName = (GTextField)GetChild("TextName");
|
||||
Currency = (GComponent)GetChild("Currency");
|
||||
BtnClose = (GButton)GetChild("BtnClose");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/CommonMenu.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Common/CommonMenu.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 195be61b5e6ed4de4b8cec3c2ce8d003
|
||||
31
Assets/Scripts/UI/Common/CommonMenu.cs
Normal file
31
Assets/Scripts/UI/Common/CommonMenu.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class CommonMenu : GLabel
|
||||
{
|
||||
public event Action OnClose;
|
||||
public event Action<int> OnTabChange;
|
||||
private void OnInited()
|
||||
{
|
||||
BtnClose.onClick.Add(OnClickClose);
|
||||
}
|
||||
|
||||
public void SetTabs()
|
||||
{
|
||||
List.RemoveChildrenToPool();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnClickClose()
|
||||
{
|
||||
OnClose?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/CommonMenu.cs.meta
Normal file
2
Assets/Scripts/UI/Common/CommonMenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b18b4ca156e62462ba447a851e105615
|
||||
Reference in New Issue
Block a user