主页面相关内容和快捷键修改

This commit is contained in:
bob
2025-06-03 18:04:28 +08:00
parent 9334999332
commit 372e81508e
101 changed files with 607 additions and 833 deletions

View File

@@ -0,0 +1,27 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class BtnTextInputControl
{
public const string URL = "ui://6hgkvlaunmzbk6";
public Controller show;
public GTextField TextInput;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
show = GetController("show");
TextInput = (GTextField)GetChild("TextInput");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e99f131a7321e8e42bf9eb6bfe452c8b

View File

@@ -0,0 +1,15 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class BtnTextInputControl : GButton
{
private void OnInited()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ba21874e88e12e347a543e98c6dc286f

View File

@@ -0,0 +1,27 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class MarqueeTag
{
public const string URL = "ui://6hgkvlaulvqll9";
public GRichTextField TextContent1;
public GRichTextField TextContent2;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
TextContent1 = (GRichTextField)GetChild("TextContent1");
TextContent2 = (GRichTextField)GetChild("TextContent2");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6a9cfe2c247599a4aacfea389e45ce14

View File

@@ -0,0 +1,15 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class MarqueeTag : GComponent
{
private void OnInited()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 70a1e1d821a7bc24e8eac7cc9bbf074b

View File

@@ -9,10 +9,7 @@ namespace NBF
{
public partial class BottomMenu : GComponent
{
public event Action OnBack;
public event Action OnEnter;
public event Action OnTab;
public event Action OnUse;
private IUIPanel _panel;
private void OnInited()
{
@@ -26,27 +23,18 @@ namespace NBF
item.OnAction?.Invoke();
}
public void UnUse()
{
OnBack = null;
OnEnter = null;
OnTab = null;
OnUse = null;
InputManager.OnUICanceled -= OnAction;
}
public void Use()
public void Use(IUIPanel panel)
{
_panel = panel;
List.RemoveChildrenToPool();
LeftList.RemoveChildrenToPool();
InputManager.OnUICanceled += OnAction;
AddButtonItem(OnUse, "");
AddButtonItem(OnTab, InputDef.UI.Tab);
AddButtonItem(OnEnter, InputDef.UI.Enter);
AddButtonItem(OnBack, InputDef.UI.Back);
// AddButtonItem(OnUse, "");
// AddButtonItem(OnTab, InputDef.UI.Tab);
// AddButtonItem(OnEnter, InputDef.UI.Enter);
// AddButtonItem(OnBack, InputDef.UI.Back);
}
private void AddButtonItem(Action action, string actionName)
@@ -63,6 +51,7 @@ namespace NBF
private void OnAction(string action)
{
if (_panel == null || !_panel.IsShowing || !_panel.IsTop) return;
var children = List.GetChildren();
foreach (var child in children)
{

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 059888fe216d4a789f01c3289be01645
timeCreated: 1748933992

View File

@@ -0,0 +1,20 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址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 CommonTopPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
[AutoFind(Name = "Marquee")]
public MarqueeTag Marquee;
public override string[] GetDependPackages(){ return new string[] {}; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: bbb8f680eb100a84c957fad39fae2e96

View File

@@ -0,0 +1,49 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using UnityEngine;
using NBC;
namespace NBF
{
public partial class CommonTopPanel : UIPanel
{
public override string UIPackName => "Common";
public override string UIResName => "CommonTopPanel";
protected override void OnInit()
{
ContentPane.sortingOrder = UIDef.UIOrder.CommonTopPanel;
}
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
}
private void OnUICanceled(string action)
{
if (action == InputDef.UI.Back)
{
var uis = UI.Inst.GetAllUI();
foreach (var ui in uis)
{
if (ui.ContentPane.sortingOrder > 0) continue;
if (ui.IsTop && !IsDontBack)
{
ui.Hide();
}
}
}
}
protected override void OnHide()
{
InputManager.OnUICanceled -= OnUICanceled;
}
protected override void OnDestroy()
{
base.OnDestroy();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b07b25d31dce1224e913094a95196cbb

View File

@@ -53,8 +53,9 @@ namespace NBF
ShowAnim = UIPanelAnimation.GetCenterScaleBig(this);
HideAnim = UIPanelAnimation.GetCenterScaleBig(this, true);
IsModal = true;
IsDontBack = true;
}
protected override void OnShow()
{
TextTitle.text = _title;

View File

@@ -0,0 +1,25 @@
/**注册组件多语言绑定。本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using System.Collections.Generic;
using FairyGUI;
using NBC;
namespace NBF
{
public class UILangeageConfig : UIComponentLanguagePack
{
public UILangeageConfig()
{
AddData();
}
private void AddData()
{
Add("ui://hxr7rc7poy1y0", new UIComponentLanguage()
{
{ "n5_ips6", "Text_TEST" },
}
);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2e2fee56cdc61a3489d6695392a1b25e