| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using FairyGUI;
- using UI.CommonGame;
- using System.Collections;
- using cfg.GfgCfg;
- namespace GFGGame
- {
- public class DressUpItemTipsView : BaseWindow
- {
- private UI_DressUpItemTips _ui;
- protected override void OnInit()
- {
- base.OnInit();
- _ui = UI_DressUpItemTips.Create();
- this.viewCom = _ui.target;
- this.viewCom.Center();
- this.modal = true;
- viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
- }
- protected override void OnShown()
- {
- base.OnShown();
- int itemID = (int)viewData;
- ItemCfg itemCfg = CommonDataManager.Tables.TblItemCfg.GetOrDefault(itemID);
- _ui.m_txtOwned.SetVar("count", "" + ItemDataManager.GetItemNum(itemID)).FlushVars();
- _ui.m_txtName.text = itemCfg.Name;
- _ui.m_txtDesc.text = itemCfg.Desc;
- RarityIconController.UpdateRarityIcon(_ui.m_rarity, itemID, false);
- _ui.m_txtGong.text = "" + itemCfg.Score1;
- _ui.m_txtShang.text = "" + itemCfg.Score2;
- _ui.m_txtJue.text = "" + itemCfg.Score3;
- _ui.m_txtZhi.text = "" + itemCfg.Score4;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- }
- }
|