主页面
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public class UI
|
||||
{
|
||||
public static UIManager _inst;
|
||||
private static UIManager _inst;
|
||||
|
||||
public static UIManager Inst
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace NBF
|
||||
UIObjectFactory.SetPackageItemExtension(FishingStateInfo.URL, typeof(FishingStateInfo));
|
||||
UIObjectFactory.SetPackageItemExtension(InteractiveTag.URL, typeof(InteractiveTag));
|
||||
UIObjectFactory.SetPackageItemExtension(FishingPower.URL, typeof(FishingPower));
|
||||
UIObjectFactory.SetPackageItemExtension(WeatherInfo.URL, typeof(WeatherInfo));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace NBF
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(SettingItem.URL, typeof(SettingItem));
|
||||
UIObjectFactory.SetPackageItemExtension(IntroduceTag.URL, typeof(IntroduceTag));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeButtonGroups.URL, typeof(HomeButtonGroups));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,14 +22,14 @@ namespace NBF
|
||||
[AutoFind(Name = "TextFPS")]
|
||||
public GTextField TextFPS;
|
||||
[AutoFind(Name = "TextTime")]
|
||||
public WeatherInfo TextTime;
|
||||
public GLabel TextTime;
|
||||
[AutoFind(Name = "FishingState")]
|
||||
public FishingStateInfo FishingState;
|
||||
[AutoFind(Name = "Interactive")]
|
||||
public InteractiveTag Interactive;
|
||||
[AutoFind(Name = "OperationTips")]
|
||||
public GList OperationTips;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
43
Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs
generated
Normal file
43
Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeButtonGroups
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvqln";
|
||||
|
||||
public GButton BtnMap;
|
||||
public GButton BtnMessage;
|
||||
public GButton BtnExit;
|
||||
public GButton BtnSettings;
|
||||
public GButton BtnStatistics;
|
||||
public GButton BtnBag;
|
||||
public GButton BtnSkill;
|
||||
public GButton BtnPass;
|
||||
public GButton BtnMission;
|
||||
public GButton BtnTournament;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BtnMap = (GButton)GetChild("BtnMap");
|
||||
BtnMessage = (GButton)GetChild("BtnMessage");
|
||||
BtnExit = (GButton)GetChild("BtnExit");
|
||||
BtnSettings = (GButton)GetChild("BtnSettings");
|
||||
BtnStatistics = (GButton)GetChild("BtnStatistics");
|
||||
BtnBag = (GButton)GetChild("BtnBag");
|
||||
BtnSkill = (GButton)GetChild("BtnSkill");
|
||||
BtnPass = (GButton)GetChild("BtnPass");
|
||||
BtnMission = (GButton)GetChild("BtnMission");
|
||||
BtnTournament = (GButton)GetChild("BtnTournament");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Home/HomeButtonGroups.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 008c0b556690f1a4f9ea76cb05b6746e
|
||||
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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/HomeButtonGroups.cs.meta
Normal file
2
Assets/Scripts/UI/Home/HomeButtonGroups.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52070c9a16d995346a51eb093365c170
|
||||
8
Assets/Scripts/UI/Home/HomePanel.Designer.cs
generated
8
Assets/Scripts/UI/Home/HomePanel.Designer.cs
generated
@@ -11,8 +11,12 @@ namespace NBF
|
||||
public partial class HomePanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
[AutoFind(Name = "Bottom")]
|
||||
public BottomMenu Bottom;
|
||||
[AutoFind(Name = "Menu")]
|
||||
public CommonMenu Menu;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
[AutoFind(Name = "OpGroup")]
|
||||
public HomeButtonGroups OpGroup;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user