提交修改
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using NBF.Utils;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
@@ -11,5 +12,11 @@ namespace NBF
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void SetData(ItemInfo itemInfo)
|
||||
{
|
||||
title = itemInfo.ConfigId.GetName();
|
||||
this.SetIcon(itemInfo.ConfigId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,10 @@ namespace NBF
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
ItemList.List.OnClickItem += OnClickItem;
|
||||
Game.Input.OnUICanceled += OnUICanceled;
|
||||
UseBottomMenu();
|
||||
|
||||
@@ -55,6 +57,12 @@ namespace NBF
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickItem(object item)
|
||||
{
|
||||
// ItemDetailsPanel.s
|
||||
ItemDetailsPanel.Show();
|
||||
}
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.Use(this);
|
||||
@@ -63,6 +71,7 @@ namespace NBF
|
||||
protected override void OnHide()
|
||||
{
|
||||
Game.Input.OnUICanceled -= OnUICanceled;
|
||||
ItemList.List.OnClickItem -= OnClickItem;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
|
||||
33
Assets/Scripts/UI/Bag/GearItem.Designer.cs
generated
Normal file
33
Assets/Scripts/UI/Bag/GearItem.Designer.cs
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class GearItem
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7pnzfp1n";
|
||||
|
||||
public GTextField TextTitle;
|
||||
public GTextField TextDesc;
|
||||
public GButton BtnClose;
|
||||
public GImage Quality;
|
||||
public GLoader TagIcon;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
TextTitle = (GTextField)GetChild("TextTitle");
|
||||
TextDesc = (GTextField)GetChild("TextDesc");
|
||||
BtnClose = (GButton)GetChild("BtnClose");
|
||||
Quality = (GImage)GetChild("Quality");
|
||||
TagIcon = (GLoader)GetChild("TagIcon");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Bag/GearItem.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Bag/GearItem.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3958da30a5539fd40bf58bf9f7af003f
|
||||
15
Assets/Scripts/UI/Bag/GearItem.cs
Normal file
15
Assets/Scripts/UI/Bag/GearItem.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class GearItem : GButton
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Bag/GearItem.cs.meta
Normal file
2
Assets/Scripts/UI/Bag/GearItem.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a5f9858996c9ba4797aa38de40bb8b7
|
||||
27
Assets/Scripts/UI/Bag/ItemDetailsContent.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/Bag/ItemDetailsContent.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 ItemDetailsContent
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7pnzfp1o";
|
||||
|
||||
public GComponent Basic;
|
||||
public GComponent Gear;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
Basic = (GComponent)GetChild("Basic");
|
||||
Gear = (GComponent)GetChild("Gear");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fb2c8c8c6c52d048bdad6ad20707b5d
|
||||
15
Assets/Scripts/UI/Bag/ItemDetailsContent.cs
Normal file
15
Assets/Scripts/UI/Bag/ItemDetailsContent.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ItemDetailsContent : GComponent
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Bag/ItemDetailsContent.cs.meta
Normal file
2
Assets/Scripts/UI/Bag/ItemDetailsContent.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0671f09b0678a3449478f263ea01748
|
||||
40
Assets/Scripts/UI/Bag/ItemDetailsPanel.Designer.cs
generated
Normal file
40
Assets/Scripts/UI/Bag/ItemDetailsPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,40 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址: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 ItemDetailsPanel
|
||||
{
|
||||
public GObject this[string aKey] => ContentPane.GetChild(aKey);
|
||||
public override string UIPackName => "Main";
|
||||
public override string UIResName => "ItemDetailsPanel";
|
||||
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "BottomMenu")]
|
||||
public BottomMenu BottomMenu;
|
||||
[AutoFind(Name = "title")]
|
||||
public GComponent title;
|
||||
[AutoFind(Name = "modelBack")]
|
||||
public GImage modelBack;
|
||||
[AutoFind(Name = "Quality")]
|
||||
public GImage Quality;
|
||||
[AutoFind(Name = "Model")]
|
||||
public ModelTexture Model;
|
||||
[AutoFind(Name = "Content")]
|
||||
public ItemDetailsContent Content;
|
||||
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
|
||||
|
||||
public static void Show(object param = null){ App.UI.OpenUI<ItemDetailsPanel>(param); }
|
||||
|
||||
public static void Hide(){ App.UI.HideUI<ItemDetailsPanel>(); }
|
||||
|
||||
public static void Del(){ App.UI.DestroyUI<ItemDetailsPanel>(); }
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Bag/ItemDetailsPanel.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/Bag/ItemDetailsPanel.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06f28badaa5d4c04e9d0cdfd853a5d28
|
||||
42
Assets/Scripts/UI/Bag/ItemDetailsPanel.cs
Normal file
42
Assets/Scripts/UI/Bag/ItemDetailsPanel.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ItemDetailsPanel : UIPanel
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
Game.Input.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
private void OnUICanceled(string action)
|
||||
{
|
||||
if (!IsTop) return;
|
||||
if (action == InputDef.UI.SubPrev)
|
||||
{
|
||||
}
|
||||
else if (action == InputDef.UI.SubNext)
|
||||
{
|
||||
}
|
||||
else if (action == InputDef.UI.Up)
|
||||
{
|
||||
}
|
||||
else if (action == InputDef.UI.Down)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
Game.Input.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Bag/ItemDetailsPanel.cs.meta
Normal file
2
Assets/Scripts/UI/Bag/ItemDetailsPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0d31d3946529c3428cf34f1c1ee7488
|
||||
Reference in New Issue
Block a user