浮漂脚本
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -50,7 +50,6 @@ namespace NBF
|
||||
style.selectedIndex = 1; //有二级菜单
|
||||
}
|
||||
|
||||
|
||||
_tabList.AddRange(tabItemList);
|
||||
|
||||
if (showListTitle)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user