主页面相关内容和快捷键修改
This commit is contained in:
27
Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/Common/BtnTextInputControl.Designer.cs
generated
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e99f131a7321e8e42bf9eb6bfe452c8b
|
||||
15
Assets/Scripts/UI/Common/BtnTextInputControl.cs
Normal file
15
Assets/Scripts/UI/Common/BtnTextInputControl.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnTextInputControl : GButton
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/BtnTextInputControl.cs.meta
Normal file
2
Assets/Scripts/UI/Common/BtnTextInputControl.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba21874e88e12e347a543e98c6dc286f
|
||||
27
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs
generated
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Common/MarqueeTag.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a9cfe2c247599a4aacfea389e45ce14
|
||||
15
Assets/Scripts/UI/Common/MarqueeTag.cs
Normal file
15
Assets/Scripts/UI/Common/MarqueeTag.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class MarqueeTag : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/MarqueeTag.cs.meta
Normal file
2
Assets/Scripts/UI/Common/MarqueeTag.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70a1e1d821a7bc24e8eac7cc9bbf074b
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
3
Assets/Scripts/UI/Common/Panel.meta
Normal file
3
Assets/Scripts/UI/Common/Panel.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 059888fe216d4a789f01c3289be01645
|
||||
timeCreated: 1748933992
|
||||
20
Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs
generated
Normal file
20
Assets/Scripts/UI/Common/Panel/CommonTopPanel.Designer.cs
generated
Normal 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[] {}; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbb8f680eb100a84c957fad39fae2e96
|
||||
49
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs
Normal file
49
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta
Normal file
2
Assets/Scripts/UI/Common/Panel/CommonTopPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b07b25d31dce1224e913094a95196cbb
|
||||
@@ -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;
|
||||
25
Assets/Scripts/UI/Common/UILangeageConfig.cs
Normal file
25
Assets/Scripts/UI/Common/UILangeageConfig.cs
Normal 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" },
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/UILangeageConfig.cs.meta
Normal file
2
Assets/Scripts/UI/Common/UILangeageConfig.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e2fee56cdc61a3489d6695392a1b25e
|
||||
Reference in New Issue
Block a user