This commit is contained in:
2026-02-20 21:03:17 +08:00
parent 6cf9b8df56
commit 27a1f9d084
920 changed files with 196579 additions and 6801 deletions

View File

@@ -94,7 +94,7 @@ namespace NBF
}
else if (obj is ShopGearItem shopGearItem)
{
shopGearItem.SetData(itemData as GoodsConfig);
shopGearItem.SetData(itemData as ShopItemInfo);
}
}
@@ -110,7 +110,7 @@ namespace NBF
return BagItem.URL;
}
if (itemData is GoodsConfig goodsConfig)
if (itemData is ShopItemInfo shopItemInfo)
{
return ShopGearItem.URL;
}

View File

@@ -11,18 +11,14 @@ namespace NBF
{
public const string URL = "ui://6hgkvlaup1fps";
public Controller style;
public CommonMenu Menu;
public CommonSubMenu SubMenu;
public ClassifyList List;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
style = GetController("style");
Menu = (CommonMenu)GetChild("Menu");
SubMenu = (CommonSubMenu)GetChild("SubMenu");
List = (ClassifyList)GetChild("List");
OnInited();
UILanguage.TrySetComponentLanguage(this);

View File

@@ -19,13 +19,13 @@ namespace NBF
private void OnInited()
{
Menu.OnTabChange += ChangeTab;
SubMenu.OnTabChange += ChangeSubTab;
// SubMenu.OnTabChange += ChangeSubTab;
}
public override void Dispose()
{
Menu.OnTabChange -= ChangeTab;
SubMenu.OnTabChange -= ChangeSubTab;
// SubMenu.OnTabChange -= ChangeSubTab;
base.Dispose();
}
@@ -39,11 +39,11 @@ namespace NBF
{
_tabList.Clear();
_currentTab = null;
style.selectedIndex = 0; //一级菜单
if (tabItemList.Any(tabItem => tabItem.Children.Count > 0))
{
style.selectedIndex = 1; //有二级菜单
}
// style.selectedIndex = 0; //一级菜单
// if (tabItemList.Any(tabItem => tabItem.Children.Count > 0))
// {
// style.selectedIndex = 1; //有二级菜单
// }
_tabList.AddRange(tabItemList);
@@ -75,16 +75,15 @@ namespace NBF
if (index < 0) return;
var tabListData = _tabList[index];
_currentTab = tabListData;
var id1 = this.GetHashCode();
if (style.selectedIndex == 0)
// if (style.selectedIndex == 0)
{
//只有一级菜单
List.SetListData(_currentTab.Items);
}
else
{
SubMenu.SetTabs(_currentTab.Children);
}
// else
// {
// SubMenu.SetTabs(_currentTab.Children);
// }
}
private void ChangeSubTab(int index)