资源目录调整
This commit is contained in:
@@ -9,7 +9,7 @@ namespace NBF
|
||||
[UIExtensionAutoBind]
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(ShopGearItem.URL, typeof(ShopGearItem));
|
||||
UIObjectFactory.SetPackageItemExtension(ShopItem.URL, typeof(ShopItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,9 +129,9 @@ namespace NBF
|
||||
{
|
||||
var itemData = _listData[index];
|
||||
|
||||
if (itemData is ShopGearData)
|
||||
if (itemData is ShopItemInfo)
|
||||
{
|
||||
return ShopGearItem.URL;
|
||||
return ShopItem.URL;
|
||||
}
|
||||
|
||||
if (itemData is ItemInfo itemInfo)
|
||||
|
||||
28
Assets/Scripts/UI/Common2Binder.cs
Normal file
28
Assets/Scripts/UI/Common2Binder.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
/**注册组件绑定关系。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public static class Common2Binder
|
||||
{
|
||||
[UIExtensionAutoBind]
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(SelectPages.URL, typeof(SelectPages));
|
||||
UIObjectFactory.SetPackageItemExtension(BottomMenu.URL, typeof(BottomMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonInput.URL, typeof(CommonInput));
|
||||
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonMenu.URL, typeof(CommonMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(MarqueeTag.URL, typeof(MarqueeTag));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTextInputControl.URL, typeof(BtnTextInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonItemList.URL, typeof(CommonItemList));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTitleInputControl.URL, typeof(BtnTitleInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(NoticeItem.URL, typeof(NoticeItem));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonSubMenu.URL, typeof(CommonSubMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnInputControl.URL, typeof(BtnInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(ListTitleItem.URL, typeof(ListTitleItem));
|
||||
UIObjectFactory.SetPackageItemExtension(ModelViewer.URL, typeof(ModelViewer));
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common2Binder.cs.meta
Normal file
2
Assets/Scripts/UI/Common2Binder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f891cc748e825346b263bab6ed92a69
|
||||
14
Assets/Scripts/UI/CommonNewBinder.cs
Normal file
14
Assets/Scripts/UI/CommonNewBinder.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
/**注册组件绑定关系。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public static class CommonNewBinder
|
||||
{
|
||||
[UIExtensionAutoBind]
|
||||
public static void BindAll()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/CommonNewBinder.cs.meta
Normal file
2
Assets/Scripts/UI/CommonNewBinder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d63faf326c6305c419050dd92f09a3ba
|
||||
@@ -30,9 +30,9 @@ namespace NBF
|
||||
{
|
||||
await LoginHelper.Login(InputAccount.text);
|
||||
|
||||
BagPanel.Show();
|
||||
// BagPanel.Show();
|
||||
// BagSlotPanel.Show();
|
||||
// FishingShopPanel.Show();
|
||||
FishingShopPanel.Show();
|
||||
|
||||
Del();
|
||||
}
|
||||
|
||||
2
Assets/Scripts/UI/ShopGearItem.Designer.cs.meta
Normal file
2
Assets/Scripts/UI/ShopGearItem.Designer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92579122ea9d5304082e11a70b36b7e1
|
||||
15
Assets/Scripts/UI/ShopGearItem.cs
Normal file
15
Assets/Scripts/UI/ShopGearItem.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ShopGearItem : GButton
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/ShopGearItem.cs.meta
Normal file
2
Assets/Scripts/UI/ShopGearItem.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9f9ed6de5b3acd40916c6a8a0aa1b1b
|
||||
@@ -9,11 +9,6 @@ using UIPanel = NBC.UIPanel;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class ShopGearData
|
||||
{
|
||||
public string title;
|
||||
}
|
||||
|
||||
public partial class FishingShopPanel : UIPanel
|
||||
{
|
||||
protected override void OnInit()
|
||||
@@ -22,33 +17,33 @@ namespace NBF
|
||||
this.AutoAddClick(OnClick);
|
||||
IsShowCursor = true;
|
||||
|
||||
List<TabItemData> tabItemList = new List<TabItemData>();
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
TabItemData tabItem = new TabItemData();
|
||||
tabItem.Key = $"Tab_{i}";
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
TabItemData tabSubItem = new TabItemData();
|
||||
tabSubItem.Key = $"SubTab_{j}";
|
||||
var count = Random.Range(2, 5);
|
||||
for (int k = 0; k < count; k++)
|
||||
{
|
||||
var item = new ShopGearData
|
||||
{
|
||||
title = $"Item:{i}-{j}-{k}"
|
||||
};
|
||||
tabSubItem.Items.Add(item);
|
||||
}
|
||||
|
||||
tabItem.Children.Add(tabSubItem);
|
||||
}
|
||||
|
||||
tabItemList.Add(tabItem);
|
||||
}
|
||||
|
||||
ItemList.SetPanel(this);
|
||||
ItemList.SetData(tabItemList, true, true);
|
||||
// List<TabItemData> tabItemList = new List<TabItemData>();
|
||||
// for (int i = 0; i < 10; i++)
|
||||
// {
|
||||
// TabItemData tabItem = new TabItemData();
|
||||
// tabItem.Key = $"Tab_{i}";
|
||||
// for (int j = 0; j < 5; j++)
|
||||
// {
|
||||
// TabItemData tabSubItem = new TabItemData();
|
||||
// tabSubItem.Key = $"SubTab_{j}";
|
||||
// var count = Random.Range(2, 5);
|
||||
// for (int k = 0; k < count; k++)
|
||||
// {
|
||||
// var item = new ShopGearData
|
||||
// {
|
||||
// title = $"Item:{i}-{j}-{k}"
|
||||
// };
|
||||
// tabSubItem.Items.Add(item);
|
||||
// }
|
||||
//
|
||||
// tabItem.Children.Add(tabSubItem);
|
||||
// }
|
||||
//
|
||||
// tabItemList.Add(tabItem);
|
||||
// }
|
||||
//
|
||||
// ItemList.SetPanel(this);
|
||||
// ItemList.SetData(tabItemList, true, true);
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
@@ -65,8 +60,8 @@ namespace NBF
|
||||
|
||||
private void OnClickItem(object item)
|
||||
{
|
||||
if (item is not ShopGearItem shopGearItem) return;
|
||||
Log.Info($"click item ={shopGearItem.GearData.title}");
|
||||
if (item is not ShopItem shopGearItem) return;
|
||||
// Log.Info($"click item ={shopGearItem.GearData.title}");
|
||||
}
|
||||
|
||||
private void OnClick(GComponent btn)
|
||||
|
||||
33
Assets/Scripts/UI/Shops/ShopItem.Designer.cs
generated
Normal file
33
Assets/Scripts/UI/Shops/ShopItem.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 ShopItem
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7poome9";
|
||||
|
||||
public GImage back;
|
||||
public GImage Quality;
|
||||
public GTextField TextCoin;
|
||||
public GLoader CoinIcon;
|
||||
public GTextField TextCoin_2;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
back = (GImage)GetChild("back");
|
||||
Quality = (GImage)GetChild("Quality");
|
||||
TextCoin = (GTextField)GetChild("TextCoin");
|
||||
CoinIcon = (GLoader)GetChild("CoinIcon");
|
||||
TextCoin_2 = (GTextField)GetChild("TextCoin");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,18 +6,18 @@ using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class ShopGearItem : ListItemBase
|
||||
public partial class ShopItem : ListItemBase
|
||||
{
|
||||
public ShopGearData GearData;
|
||||
// public ShopGearData GearData;
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnSetData(object showData)
|
||||
{
|
||||
GearData = showData as ShopGearData;
|
||||
if(GearData == null) return;
|
||||
title = GearData.title;
|
||||
// GearData = showData as ShopGearData;
|
||||
// if(GearData == null) return;
|
||||
// title = GearData.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user