浮漂脚本

This commit is contained in:
2025-11-26 14:28:55 +08:00
parent 293890c649
commit 6b5e43d813
110 changed files with 1659 additions and 12039 deletions

View File

@@ -121,6 +121,10 @@ namespace NBF
titleItem.SetData(itemData);
titleItem.SetSize(List.width, 32);
}
else if (obj is ShopGearItem shopGearItem)
{
shopGearItem.SetData(itemData as GoodsConfig);
}
}
@@ -128,17 +132,18 @@ namespace NBF
string GetListItemResource(int index)
{
var itemData = _listData[index];
if (itemData is ShopItemInfo)
{
return ShopItem.URL;
}
if (itemData is ItemInfo itemInfo)
{
return BagItem.URL;
}
if (itemData is GoodsConfig goodsConfig)
{
return ShopGearItem.URL;
}
if (itemData is ClassifyListTitleData titleData)
{
return ListTitleItem.URL;

View File

@@ -50,7 +50,6 @@ namespace NBF
style.selectedIndex = 1; //有二级菜单
}
_tabList.AddRange(tabItemList);
if (showListTitle)

View File

@@ -11,9 +11,7 @@ namespace NBF
{
public const string URL = "ui://6hgkvlaufcfggr";
public Controller showType;
public GList List;
public GButton BtnUserHead;
public BtnInputControl BtnPrev;
public BtnInputControl BtnNext;
@@ -21,9 +19,7 @@ namespace NBF
{
base.ConstructFromXML(xml);
showType = GetController("showType");
List = (GList)GetChild("List");
BtnUserHead = (GButton)GetChild("BtnUserHead");
BtnPrev = (BtnInputControl)GetChild("BtnPrev");
BtnNext = (BtnInputControl)GetChild("BtnNext");
OnInited();

View File

@@ -39,7 +39,12 @@ namespace NBF
public void SetData(ItemInfo itemInfo)
{
_renderImage.SetModel(PrefabsHelper.CreateItem(itemInfo), ModelViewerSettings.Load(itemInfo.ConfigId));
_renderImage.SetModel(PrefabsHelper.CreateItem(itemInfo.Config), ModelViewerSettings.Load(itemInfo.ConfigId));
}
public void SetData(ItemConfig itemConfig)
{
_renderImage.SetModel(PrefabsHelper.CreateItem(itemConfig), ModelViewerSettings.Load(itemConfig.Id));
}