| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using UI.RoleInfo;
- using System.Text.RegularExpressions;
- using cfg.GfgCfg;
- using FairyGUI;
- namespace GFGGame
- {
- public class PersonalSkillView : BaseWindow
- {
- private UI_PersonalSkillUI _ui;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_PersonalSkillUI.PACKAGE_NAME;
- _ui = UI_PersonalSkillUI.Create();
- this.viewCom = _ui.target;
- this.viewCom.Center();
- this.modal = true;
- _ui.m_list.itemRenderer = RenderListItem;
- }
- protected override void OnShown()
- {
- base.OnShown();
- ViewManager.SetMaskAlpha(0.8f);
- _ui.m_list.numItems = CommonDataManager.Tables.TblRoleSkillCfg.DataList.Count;
- }
- protected override void OnHide()
- {
- base.OnHide();
- ViewManager.SetMaskAlpha(0.6f);
- }
- private void RenderListItem(int index, GObject obj)
- {
- RoleSkillCfg cfg = CommonDataManager.Tables.TblRoleSkillCfg.DataList[index];
- UI_ListSkillItem item = UI_ListSkillItem.Proxy(obj);
- item.m_loaIcon.url = string.Format("ui://RoleInfo/{0}", cfg.Res);
- item.m_txtname.text = cfg.Name;
- item.m_txtDesc.text = cfg.Desc;
- UI_ListSkillItem.ProxyEnd();
- }
- }
- }
|