home打开关闭逻辑修改调整提交
This commit is contained in:
@@ -10,6 +10,7 @@ namespace NBF
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(SelectPages.URL, typeof(SelectPages));
|
||||
UIObjectFactory.SetPackageItemExtension(UIBlurBackground.URL, typeof(UIBlurBackground));
|
||||
UIObjectFactory.SetPackageItemExtension(BottomMenu.URL, typeof(BottomMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonInput.URL, typeof(CommonInput));
|
||||
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));
|
||||
|
||||
@@ -17,6 +17,17 @@ namespace NBF
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (action == InputDef.UI.Back)
|
||||
{
|
||||
var panel = UI.Inst.GetUI<HomePanel>();
|
||||
if (panel != null && panel.IsShowing) return;
|
||||
HomePanel.Show();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
@@ -60,6 +71,7 @@ namespace NBF
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
|
||||
@@ -36,10 +36,21 @@ namespace NBF
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
InputManager.Instance.On(this);
|
||||
Menu.SetTabs(tabList);
|
||||
ChangeTab(0);
|
||||
}
|
||||
|
||||
#region UI事件
|
||||
|
||||
[InputInvoke(InputDef.UI.Back, UIInputButtonShowMode.BottomRight)]
|
||||
private void OnBack()
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tab切换
|
||||
|
||||
private void ChangeTab(int index)
|
||||
@@ -84,6 +95,7 @@ namespace NBF
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
InputManager.Instance.Off(this);
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace NBF
|
||||
{
|
||||
await LoginHelper.Login(InputAccount.text);
|
||||
|
||||
// await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
|
||||
await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
|
||||
// await MapHelper.EnterMap(mapId, role.RoomCode);
|
||||
|
||||
// BagPanel.Show();
|
||||
// BagSlotPanel.Show();
|
||||
|
||||
// SettingPanel.Show();
|
||||
HomePanel.Show();
|
||||
// FishingShopPanel.Show();
|
||||
// HomePanel.Show();
|
||||
FishingShopPanel.Show();
|
||||
|
||||
Del();
|
||||
}
|
||||
|
||||
27
Assets/Scripts/UI/UIBlurBackground.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/UIBlurBackground.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 UIBlurBackground
|
||||
{
|
||||
public const string URL = "ui://6hgkvlau8hy8la";
|
||||
|
||||
public GLoader Back;
|
||||
public GImage back;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
Back = (GLoader)GetChild("Back");
|
||||
back = (GImage)GetChild("back");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/UIBlurBackground.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/UIBlurBackground.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37696980c373d4d46884022914bfe1b9
|
||||
31
Assets/Scripts/UI/UIBlurBackground.cs
Normal file
31
Assets/Scripts/UI/UIBlurBackground.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class UIBlurBackground : GLabel
|
||||
{
|
||||
private NTexture _nTexture;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
// icon = new NTexture(your_Texture2D);
|
||||
// UIBlur.texture = new NTexture(UIBlur);
|
||||
UIBlur.Instance.CaptureAndBlurOnce();
|
||||
Back.texture = new NTexture(UIBlur.Instance.blurRT);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
// if (_nTexture != null)
|
||||
// {
|
||||
// _nTexture = null;
|
||||
// }
|
||||
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/UIBlurBackground.cs.meta
Normal file
2
Assets/Scripts/UI/UIBlurBackground.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93754091e25692446aabdab03d905f42
|
||||
Reference in New Issue
Block a user