private void ButtonSetActive(BattleResultFriendReqInfo.FRIEND_TYPE friend_type) { this.buttonSprite.spriteName = ((friend_type != BattleResultFriendReqInfo.FRIEND_TYPE.NONE) ? "Common02_Btn_BaseG" : "Common02_Btn_BaseON1"); this.buttonLabel.color = ((friend_type != BattleResultFriendReqInfo.FRIEND_TYPE.NONE) ? Color.gray : Color.white); this.buttonCollider.enabled = (friend_type == BattleResultFriendReqInfo.FRIEND_TYPE.NONE); switch (friend_type) { case BattleResultFriendReqInfo.FRIEND_TYPE.NONE: this.buttonLabel.text = StringMaster.GetString("BattleResult-07"); break; case BattleResultFriendReqInfo.FRIEND_TYPE.FRIEND: this.buttonLabel.text = StringMaster.GetString("FriendTitle"); break; case BattleResultFriendReqInfo.FRIEND_TYPE.APPLYING: this.buttonLabel.text = StringMaster.GetString("BattleResult-06"); break; case BattleResultFriendReqInfo.FRIEND_TYPE.STAY: this.buttonLabel.text = StringMaster.GetString("BattleResult-05"); break; } }
public void SetStatusInfo(string user_id, string user_name, int leader_lv, string leader_monster_id, string title_id, BattleResultFriendReqInfo.FRIEND_TYPE friend_type) { this.userId = user_id; this.TXT_NAME.text = user_name; this.TXT_LV.text = leader_lv.ToString(); TitleDataMng.SetTitleIcon(title_id, this.titleIcon); MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(leader_monster_id); GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.iconAnchor.localScale, this.iconAnchor.localPosition, this.iconAnchor.parent, true, false); guimonsterIcon.name = "DigimonIcon"; UIWidget[] componentsInChildren = guimonsterIcon.GetComponentsInChildren <UIWidget>(); foreach (UIWidget uiwidget in componentsInChildren) { uiwidget.depth += 1000; } this.ButtonSetActive(friend_type); }