Merge branch 'master' of https://git.bobsong.cn/Game/Fishing2
This commit is contained in:
@@ -4,12 +4,13 @@ using System;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using UIPanel = NBC.UIPanel;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BottomMenu : GComponent
|
||||
{
|
||||
private IUIPanel _panel;
|
||||
private UIPanel _panel;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
@@ -24,7 +25,7 @@ namespace NBF
|
||||
Debug.Log("模拟点击===");
|
||||
}
|
||||
|
||||
public void Use(IUIPanel panel)
|
||||
public void Use(UIPanel panel)
|
||||
{
|
||||
_panel = panel;
|
||||
List.RemoveChildrenToPool();
|
||||
|
||||
@@ -11,10 +11,18 @@ namespace NBF
|
||||
public partial class CommonTopPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "CommonTopPanel";
|
||||
|
||||
[AutoFind(Name = "Marquee")]
|
||||
public MarqueeTag Marquee;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ App.UI.OpenUI<CommonTopPanel>(param); }
|
||||
|
||||
public static void Hide(){ App.UI.HideUI<CommonTopPanel>(); }
|
||||
|
||||
public static void Del(){ App.UI.DestroyUI<CommonTopPanel>(); }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ 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;
|
||||
@@ -25,13 +22,13 @@ namespace NBF
|
||||
{
|
||||
if (action == InputDef.UI.Back)
|
||||
{
|
||||
var uis = UI.Inst.GetAllUI();
|
||||
var uis = App.UI.GetAllUI();
|
||||
foreach (var ui in uis)
|
||||
{
|
||||
if (ui.ContentPane.sortingOrder > 0) continue;
|
||||
if (ui.IsTop && !ui.IsDontBack)
|
||||
{
|
||||
UI.Inst.HideUI(ui.GetType());
|
||||
App.UI.HideUI(ui.GetType());
|
||||
// ui.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace NBF
|
||||
public partial class GMPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "GMPanel";
|
||||
|
||||
[AutoFind(Name = "InputForce")]
|
||||
public GLabel InputForce;
|
||||
[AutoFind(Name = "BtnOk")]
|
||||
@@ -19,6 +22,11 @@ namespace NBF
|
||||
public GComboBox Dir;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ App.UI.OpenUI<GMPanel>(param); }
|
||||
|
||||
public static void Hide(){ App.UI.HideUI<GMPanel>(); }
|
||||
|
||||
public static void Del(){ App.UI.DestroyUI<GMPanel>(); }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ namespace NBF
|
||||
{
|
||||
public partial class GMPanel : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "GMPanel";
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace NBF
|
||||
public partial class MessageBox
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "MessageBox";
|
||||
|
||||
[AutoFind(Name = "MessageStyle")]
|
||||
public Controller MessageStyle;
|
||||
[AutoFind(Name = "back")]
|
||||
@@ -25,6 +28,11 @@ namespace NBF
|
||||
public BtnTitleInputControl BtnConfirm;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ App.UI.OpenUI<MessageBox>(param); }
|
||||
|
||||
public static void Hide(){ App.UI.HideUI<MessageBox>(); }
|
||||
|
||||
public static void Del(){ App.UI.DestroyUI<MessageBox>(); }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,6 @@ namespace NBF
|
||||
{
|
||||
public partial class MessageBox : UIPanel
|
||||
{
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "MessageBox";
|
||||
|
||||
private static string _confirmText;
|
||||
private static string _cancelText;
|
||||
private static string _title;
|
||||
@@ -44,14 +41,14 @@ namespace NBF
|
||||
_content = msg;
|
||||
_title = title;
|
||||
_style = style;
|
||||
UI.Inst.OpenUI<MessageBox>();
|
||||
Show();
|
||||
}
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
this.AutoAddClick(OnClick);
|
||||
ShowAnim = UIPanelAnimation.GetCenterScaleBig(this);
|
||||
HideAnim = UIPanelAnimation.GetCenterScaleBig(this, true);
|
||||
ShowAnim = this.ShowCenterScaleBig;
|
||||
HideAnim = this.HideCenterScaleBig;
|
||||
IsModal = true;
|
||||
IsDontBack = true;
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
|
||||
@@ -11,10 +11,18 @@ namespace NBF
|
||||
public partial class Notices
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "Notices";
|
||||
|
||||
[AutoFind(Name = "show")]
|
||||
public Controller show;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ App.UI.OpenUI<Notices>(param); }
|
||||
|
||||
public static void Hide(){ App.UI.HideUI<Notices>(); }
|
||||
|
||||
public static void Del(){ App.UI.DestroyUI<Notices>(); }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,7 @@ namespace NBF
|
||||
public NoticeType Type;
|
||||
public string Text;
|
||||
}
|
||||
|
||||
public override string UIPackName => "Common";
|
||||
public override string UIResName => "Notices";
|
||||
|
||||
|
||||
private static bool _isOpen;
|
||||
private static readonly Queue<NoticeData> _msgArr = new();
|
||||
|
||||
@@ -46,7 +43,7 @@ namespace NBF
|
||||
Log.Info($"显示一个notice={msg}");
|
||||
if (!_isOpen)
|
||||
{
|
||||
UI.Inst.OpenUI<Notices>();
|
||||
Notices.Show();
|
||||
}
|
||||
|
||||
_msgArr.Enqueue(new NoticeData { Type = noticeType, Text = msg });
|
||||
@@ -75,8 +72,6 @@ namespace NBF
|
||||
_startX = GRoot.inst.width - ItemWidth - Gap;
|
||||
_itemUrl = UIPackage.GetItemURL(UIDef.Pack.Common, "NoticeItem");
|
||||
_noticePool = new GObjectPool(ContentPane.container.cachedTransform);
|
||||
|
||||
MonoManager.Inst.OnUpdate += OnUpdate;
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
|
||||
Reference in New Issue
Block a user