首次提交
This commit is contained in:
25
Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Home/Pages/HomeActivityPage.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeActivityPage
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvql11";
|
||||
|
||||
public BottomMenu BottomMenu;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BottomMenu = (BottomMenu)GetChild("BottomMenu");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cee4ebc54c0f434f9443cee69971ab3
|
||||
23
Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs
Normal file
23
Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeActivityPage : HomePageBase
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta
Normal file
2
Assets/Scripts/UI/Home/Pages/HomeActivityPage.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7341727571ae65c4bbc3ce2bd9a94e8b
|
||||
29
Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs
generated
Normal file
29
Assets/Scripts/UI/Home/Pages/HomeMainPage.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeMainPage
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvql10";
|
||||
|
||||
public ModelViewer Model;
|
||||
public HomeButtonGroups OpGroup;
|
||||
public BottomMenu BottomMenu;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
Model = (ModelViewer)GetChild("Model");
|
||||
OpGroup = (HomeButtonGroups)GetChild("OpGroup");
|
||||
BottomMenu = (BottomMenu)GetChild("BottomMenu");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 044cd5f648db2c94ea89ef77f1891ed4
|
||||
74
Assets/Scripts/UI/Home/Pages/HomeMainPage.cs
Normal file
74
Assets/Scripts/UI/Home/Pages/HomeMainPage.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeMainPage : HomePageBase
|
||||
{
|
||||
private ButtonNavigate navigate;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
List<GButton> buttons = new List<GButton>();
|
||||
var children = OpGroup.GetChildren();
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (child is GButton button)
|
||||
{
|
||||
buttons.Add(button);
|
||||
}
|
||||
}
|
||||
|
||||
// buttons.Add(BtnTest);
|
||||
|
||||
navigate = new ButtonNavigate(buttons);
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
|
||||
// Model.LoadAsset(0);
|
||||
// Model.SetBackground(Panel.Back.GetChild("back"));//, Panel.Back.GetChild("icon")
|
||||
}
|
||||
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (!Panel.IsTop) return;
|
||||
if (action == InputDef.UI.SubPrev)
|
||||
{
|
||||
}
|
||||
else if (action == InputDef.UI.SubNext)
|
||||
{
|
||||
}
|
||||
else if (action == InputDef.UI.Up)
|
||||
{
|
||||
navigate.Up();
|
||||
}
|
||||
else if (action == InputDef.UI.Down)
|
||||
{
|
||||
navigate.Down();
|
||||
}
|
||||
else if (action == InputDef.UI.Right)
|
||||
{
|
||||
navigate.Right();
|
||||
}
|
||||
else if (action == InputDef.UI.Left)
|
||||
{
|
||||
navigate.Left();
|
||||
}
|
||||
else if (action == InputDef.UI.Enter)
|
||||
{
|
||||
navigate.Click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta
Normal file
2
Assets/Scripts/UI/Home/Pages/HomeMainPage.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 648dd38953354c94a89c7c23d24abeb3
|
||||
48
Assets/Scripts/UI/Home/Pages/HomePageBase.cs
Normal file
48
Assets/Scripts/UI/Home/Pages/HomePageBase.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class HomePageBase : GComponent
|
||||
{
|
||||
public int Page;
|
||||
|
||||
public HomePanel Panel;
|
||||
|
||||
public void Show(HomePanel panel)
|
||||
{
|
||||
Panel = panel;
|
||||
ShowAnimation();
|
||||
OnShow();
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
if (visible)
|
||||
{
|
||||
HideAnimation();
|
||||
OnHide();
|
||||
}
|
||||
}
|
||||
|
||||
#region Anim
|
||||
|
||||
private void ShowAnimation()
|
||||
{
|
||||
visible = true;
|
||||
alpha = 0;
|
||||
GTween.Kill(this);
|
||||
TweenFade(1, 0.5f);
|
||||
}
|
||||
|
||||
private void HideAnimation()
|
||||
{
|
||||
GTween.Kill(this);
|
||||
TweenFade(0, 0.2f).OnComplete(() => { visible = false; });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected abstract void OnShow();
|
||||
protected abstract void OnHide();
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta
Normal file
3
Assets/Scripts/UI/Home/Pages/HomePageBase.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb0a4fb73e0c4eafa11ab8028331637b
|
||||
timeCreated: 1748925820
|
||||
25
Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Home/Pages/HomeRankPage.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeRankPage
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvql12";
|
||||
|
||||
public BottomMenu BottomMenu;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BottomMenu = (BottomMenu)GetChild("BottomMenu");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b909a0d4f6fa0b441bd779977ab6403a
|
||||
25
Assets/Scripts/UI/Home/Pages/HomeRankPage.cs
Normal file
25
Assets/Scripts/UI/Home/Pages/HomeRankPage.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeRankPage : HomePageBase
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta
Normal file
2
Assets/Scripts/UI/Home/Pages/HomeRankPage.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40506befb27a31a4786085ec5416efc7
|
||||
25
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeStatisticsPage
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7plvql13";
|
||||
|
||||
public BottomMenu BottomMenu;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
BottomMenu = (BottomMenu)GetChild("BottomMenu");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d572bce2eeaf24d8a2d235976dc02c
|
||||
15
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs
Normal file
15
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class HomeStatisticsPage : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta
Normal file
2
Assets/Scripts/UI/Home/Pages/HomeStatisticsPage.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b12895a3e4e7fb4287cbf7a026d7887
|
||||
Reference in New Issue
Block a user