public void SelectCharInfo(E_CHAR_TRIBE eCharTribe) { int changeCharKindFormIndex = CharChangeMainDlg.GetChangeCharKindFormIndex(eCharTribe); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(changeCharKindFormIndex); if (charKindInfo == null) { return; } this.SetMainTexture(eCharTribe); CharChangeMainDlg.SetCharImage(this.m_dtCharBG, changeCharKindFormIndex); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindInfo.GetCHARKIND_STATINFO().kBattleSkillData[0].BattleSkillUnique); if (battleSkillBase != null) { this.m_dtSkillIcon1.SetTexture(NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique)); this.m_lbSkillName1.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey)); } BATTLESKILL_BASE battleSkillBase2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindInfo.GetCHARKIND_STATINFO().kBattleSkillData[1].BattleSkillUnique); if (battleSkillBase2 != null) { this.m_dtSkillIcon2.SetTexture(NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase2.m_nSkillUnique)); this.m_lbSkillName2.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase2.m_strTextKey)); } switch (eCharTribe) { case E_CHAR_TRIBE.HUMAN: this.m_dtWeapon1.SetTextureKey("Win_I_Weapon1"); this.m_dtWeapon2.SetTextureKey("Win_I_Weapon2"); this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50006")); this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50011")); break; case E_CHAR_TRIBE.FURRY: this.m_dtWeapon1.SetTextureKey("Win_I_Weapon3"); this.m_dtWeapon2.SetTextureKey("Win_I_Weapon6"); this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50004")); this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50008")); break; case E_CHAR_TRIBE.ELF: this.m_dtWeapon1.SetTextureKey("Win_I_Weapon7"); this.m_dtWeapon2.SetTextureKey("Win_I_Weapon8"); this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50007")); this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50009")); break; case E_CHAR_TRIBE.HUMANF: this.m_dtWeapon1.SetTextureKey("Win_I_Weapon4"); this.m_dtWeapon2.SetTextureKey("Win_I_Weapon5"); this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50005")); this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50010")); break; } }
public override void SetComponent() { this.m_dtCharBG = new DrawTexture[4]; this.m_btSelect = new Button[4]; this.m_btDetail = new Button[4]; this.m_dtShadowBG = new DrawTexture[4]; string text = string.Empty; this.m_dtMaingBG = (base.GetControl("BT_DrawTexture_DrawTexture22") as DrawTexture); Texture2D texture2D; for (int i = 0; i < 4; i++) { text = string.Format("BT_DrawTexture_CharBG{0}", (i + 1).ToString()); this.m_dtCharBG[i] = (base.GetControl(text) as DrawTexture); text = string.Format("BT_Select0{0}", (i + 1).ToString()); this.m_btSelect[i] = (base.GetControl(text) as Button); this.m_btSelect[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSelect)); text = string.Format("BT_Detail0{0}", (i + 1).ToString()); this.m_btDetail[i] = (base.GetControl(text) as Button); this.m_btDetail[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickDetail)); text = string.Format("BT_DrawTexture_CharShadow{0}", (i + 1).ToString()); this.m_dtShadowBG[i] = (base.GetControl(text) as DrawTexture); text = string.Format("UI/charselect/ChShadow" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); texture2D = (ResourceCache.GetResource(text) as Texture2D); if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtShadowBG[i]); } else { CharChangeMainDlg.SetTexture(this.m_dtShadowBG[i], texture2D); } } this.m_dtSelect = (base.GetControl("DT_Select01") as DrawTexture); this.m_dtSelect.Hide(true); this.m_btSelect[0].TabIndex = 2; this.m_btSelect[1].TabIndex = 3; this.m_btSelect[2].TabIndex = 1; this.m_btSelect[3].TabIndex = 4; this.m_btDetail[0].TabIndex = 2; this.m_btDetail[1].TabIndex = 3; this.m_btDetail[2].TabIndex = 1; this.m_btDetail[3].TabIndex = 4; this.m_lbMoney = (base.GetControl("LB_Gold") as Label); charSpend charSpend = NrTSingleton <NrBaseTableManager> .Instance.GetCharSpend(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel().ToString()); if (charSpend != null) { this.m_lNeedMoney = charSpend.lCharChangeGold; } this.m_lbMoney.SetText(ANNUALIZED.Convert(this.m_lNeedMoney)); this.m_HelpButton = (base.GetControl("Help_Button") as Button); this.m_HelpButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp)); this.m_btChange = (base.GetControl("BT_Change") as Button); this.m_btChange.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickChange)); text = string.Format("UI/charselect/ChaSelect_BG" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); texture2D = (ResourceCache.GetResource(text) as Texture2D); if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtMaingBG); } else { CharChangeMainDlg.SetTexture(this.m_dtMaingBG, texture2D); } CharChangeMainDlg.SetCharImage(this.m_dtCharBG[0], 3); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[1], 6); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[2], 1); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[3], 2); base.SetScreenCenter(); }