|
@@ -160,8 +160,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
- ViewManager.GoBackFrom(ViewName.CLOTHING_SHOP_VIEW);
|
|
|
- this.Hide();
|
|
|
+ ViewManager.GoBackFrom(typeof(GalleryShopView).FullName);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -256,76 +255,80 @@ namespace GFGGame
|
|
|
{
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
|
|
|
string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
|
|
|
- _ui.m_loaBgRes.visible = false;
|
|
|
- _ui.m_comRes.m_loaBg.visible = false;
|
|
|
- _ui.m_comRes.m_c1.selectedIndex = _ui.m_comItemList.m_comBtnTab.m_c1.selectedIndex;
|
|
|
- switch (_ui.m_comRes.m_c1.selectedIndex)
|
|
|
- {
|
|
|
- case GalleryShopTabType.BG:
|
|
|
- _ui.m_comRes.m_loaBg.url = ResPathUtil.GetDressUpPath(itemCfg.res, ext);
|
|
|
- // _ui.m_loaBgRes.visible = true;
|
|
|
- _ui.m_comRes.m_loaBg.visible = true;
|
|
|
- break;
|
|
|
- case GalleryShopTabType.NPC:
|
|
|
- _ui.m_comRes.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(itemCfg.res);
|
|
|
- break;
|
|
|
- case GalleryShopTabType.ITEM:
|
|
|
- ItemTypeCfg typeCfg = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType);
|
|
|
- int sortingOrder = typeCfg.defaultLayer;
|
|
|
-
|
|
|
- string res = itemCfg.res;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem0.visible = false;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem1.visible = false;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem2.visible = false;
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
|
- {
|
|
|
- res = itemCfg.resLayer1 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer1);
|
|
|
- string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
- // Texture2D texture2D = GFGAsset.Load<Texture2D>(resPath);
|
|
|
- // _ui.m_comRes.m_loaItem0.texture = new NTexture(texture2D); ;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem0.url = resPath;
|
|
|
- float tx, ty;
|
|
|
- DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem0.SetXY(tx, ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem0.visible = true;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem0.sortingOrder = sortingOrder;
|
|
|
- }
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
|
- {
|
|
|
- sortingOrder = typeCfg.specialLayer;
|
|
|
- res = itemCfg.resLayer2 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer2);
|
|
|
- string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
- // Texture2D texture2D = GFGAsset.Load<Texture2D>(resPath);
|
|
|
- // _ui.m_comRes.m_loaItem1.texture = new NTexture(texture2D); ;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem1.url = resPath;
|
|
|
- float tx, ty;
|
|
|
- DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem1.SetXY(tx, ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem1.visible = true;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem1.sortingOrder = sortingOrder;
|
|
|
- }
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
|
- {
|
|
|
- sortingOrder = typeCfg.thirdlLayer;
|
|
|
- res = itemCfg.resLayer3 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer3);
|
|
|
- string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
- // Texture2D texture2D = GFGAsset.Load<Texture2D>(res);
|
|
|
- // _ui.m_comRes.m_loaItem2.texture = new NTexture(texture2D);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem2.url = resPath;
|
|
|
- float tx, ty;
|
|
|
- DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem2.SetXY(tx, ty);
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem2.visible = true;
|
|
|
- _ui.m_comRes.m_comItem.m_loaItem2.sortingOrder = sortingOrder;
|
|
|
- }
|
|
|
- _ui.m_comRes.m_comItem.target.SetSize(_ui.m_comRes.m_comItem.m_grpItem.width, _ui.m_comRes.m_comItem.m_grpItem.height);
|
|
|
- break;
|
|
|
- case GalleryShopTabType.BORDER:
|
|
|
- _ui.m_comRes.m_loaBorder.url = ResPathUtil.GetPhotographBorderPath(itemCfg.res);
|
|
|
- break;
|
|
|
- case GalleryShopTabType.EFFECT:
|
|
|
- break;
|
|
|
- }
|
|
|
+ _ui.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg); ;
|
|
|
+ // _ui.m_comRes.m_loaBg.visible = false;
|
|
|
+ // _ui.m_comRes.m_c1.selectedIndex = _ui.m_comItemList.m_comBtnTab.m_c1.selectedIndex;
|
|
|
+ // switch (_ui.m_comRes.m_c1.selectedIndex)
|
|
|
+ // {
|
|
|
+ // case GalleryShopTabType.BG:
|
|
|
+ // // _ui.m_comRes.m_loaBg.url = ResPathUtil.GetDressUpPath(itemCfg.res, ext);
|
|
|
+ // _ui.m_comRes.m_loaBg.url = ResPathUtil.GetIconPath(itemCfg); ;
|
|
|
+ // // _ui.m_loaBgRes.visible = true;
|
|
|
+ // _ui.m_comRes.m_loaBg.visible = true;
|
|
|
+ // break;
|
|
|
+ // case GalleryShopTabType.NPC:
|
|
|
+ // // _ui.m_comRes.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(itemCfg.res);
|
|
|
+ // _ui.m_comRes.m_loaNpc.url = ResPathUtil.GetIconPath(itemCfg); ;
|
|
|
+ // break;
|
|
|
+ // case GalleryShopTabType.ITEM:
|
|
|
+ // ItemTypeCfg typeCfg = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType);
|
|
|
+ // int sortingOrder = typeCfg.defaultLayer;
|
|
|
+
|
|
|
+ // string res = itemCfg.res;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.visible = false;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem1.visible = false;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem2.visible = false;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.url = ResPathUtil.GetIconPath(itemCfg); ;
|
|
|
+ // // if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
|
+ // // {
|
|
|
+ // // res = itemCfg.resLayer1 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer1);
|
|
|
+ // // string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
+ // // // Texture2D texture2D = GFGAsset.Load<Texture2D>(resPath);
|
|
|
+ // // // _ui.m_comRes.m_loaItem0.texture = new NTexture(texture2D); ;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.url = resPath;
|
|
|
+ // // float tx, ty;
|
|
|
+ // // DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.SetXY(tx, ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.visible = true;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem0.sortingOrder = sortingOrder;
|
|
|
+ // // }
|
|
|
+ // // if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
|
+ // // {
|
|
|
+ // // sortingOrder = typeCfg.specialLayer;
|
|
|
+ // // res = itemCfg.resLayer2 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer2);
|
|
|
+ // // string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
+ // // // Texture2D texture2D = GFGAsset.Load<Texture2D>(resPath);
|
|
|
+ // // // _ui.m_comRes.m_loaItem1.texture = new NTexture(texture2D); ;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem1.url = resPath;
|
|
|
+ // // float tx, ty;
|
|
|
+ // // DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem1.SetXY(tx, ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem1.visible = true;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem1.sortingOrder = sortingOrder;
|
|
|
+ // // }
|
|
|
+ // // if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
|
+ // // {
|
|
|
+ // // sortingOrder = typeCfg.thirdlLayer;
|
|
|
+ // // res = itemCfg.resLayer3 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer3);
|
|
|
+ // // string resPath = ResPathUtil.GetDressUpPath(res, ext);
|
|
|
+ // // // Texture2D texture2D = GFGAsset.Load<Texture2D>(res);
|
|
|
+ // // // _ui.m_comRes.m_loaItem2.texture = new NTexture(texture2D);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem2.url = resPath;
|
|
|
+ // // float tx, ty;
|
|
|
+ // // DressUpUtil.LoadSpritePos(resPath, out tx, out ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem2.SetXY(tx, ty);
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem2.visible = true;
|
|
|
+ // // _ui.m_comRes.m_comItem.m_loaItem2.sortingOrder = sortingOrder;
|
|
|
+ // // }
|
|
|
+ // // _ui.m_comRes.m_comItem.target.SetSize(_ui.m_comRes.m_comItem.m_grpItem.width, _ui.m_comRes.m_comItem.m_grpItem.height);
|
|
|
+ // break;
|
|
|
+ // case GalleryShopTabType.BORDER:
|
|
|
+ // // _ui.m_comRes.m_loaBorder.url = ResPathUtil.GetPhotographBorderPath(itemCfg.res);
|
|
|
+ // _ui.m_comRes.m_loaBorder.url = ResPathUtil.GetIconPath(itemCfg); ;
|
|
|
+ // break;
|
|
|
+ // case GalleryShopTabType.EFFECT:
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
|
|
|
}
|
|
|
private void UpdateSelectedItemInfo()
|