资源目录调整

This commit is contained in:
2025-11-23 10:46:34 +08:00
parent 4ac44848aa
commit 523c9550fe
60 changed files with 2449 additions and 408 deletions

View File

@@ -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)