private void On_IntimacyRela_OK(CUIEvent uievent) { ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1; uint tagUInt = uievent.m_eventParams.tagUInt; COM_INTIMACY_STATE tag = uievent.m_eventParams.tag; int tag2 = uievent.m_eventParams.tag2; if (tag == 24 && tag2 != -1) { CFriendRelationship fRData = Singleton <CFriendContoller> .get_instance().model.FRData; CFriendRelationship.FRConfig cFGByIndex = fRData.GetCFGByIndex(tag2); if (cFGByIndex.state == 1) { if (fRData.FindFrist(1) == null) { FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, 1, 1); Singleton <CFriendContoller> .get_instance().model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt); } else { Singleton <CUIManager> .get_instance().OpenTips(UT.FRData().IntimRela_Tips_AlreadyHasGay, true, 1.5f, null, new object[0]); } } if (cFGByIndex.state == 2) { if (fRData.FindFrist(2) == null) { FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, 2, 1); Singleton <CFriendContoller> .get_instance().model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt); } else { Singleton <CUIManager> .get_instance().OpenTips(UT.FRData().IntimRela_Tips_AlreadyHasLover, true, 1.5f, null, new object[0]); } } } else if (tag == 20) { FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 1, 1); } else if (tag == 22) { FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 2, 1); } else if (tag == 21) { FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 1, 2); } else if (tag == 23) { FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 2, 2); } }
public static void On_NTF_CHG_INTIMACY_DENY(CSPkg msg) { SCPKG_CMD_NTF_CHG_INTIMACY_DENY stNtfChgIntimacyDeny = msg.stPkgData.get_stNtfChgIntimacyDeny(); if (stNtfChgIntimacyDeny == null) { return; } COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .get_instance().model.GetGameOrSnsFriend(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId); string strContent = string.Empty; if (stNtfChgIntimacyDeny.bRelationChgType == 1) { if (stNtfChgIntimacyDeny.bIntimacyState == 1) { if (gameOrSnsFriend != null) { strContent = string.Format(UT.FRData().IntimRela_Tips_DenyYourRequestGay, UT.Bytes2String(gameOrSnsFriend.szUserName)); } CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, 24, 0, 0u, false); } if (stNtfChgIntimacyDeny.bIntimacyState == 2) { if (gameOrSnsFriend != null) { strContent = string.Format(UT.FRData().IntimRela_Tips_DenyYourRequestLover, UT.Bytes2String(gameOrSnsFriend.szUserName)); } CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, 24, 0, 0u, false); } } if (stNtfChgIntimacyDeny.bRelationChgType == 2) { if (stNtfChgIntimacyDeny.bIntimacyState == 1) { if (gameOrSnsFriend != null) { strContent = string.Format(UT.FRData().IntimRela_Tips_DenyYourDelGay, UT.Bytes2String(gameOrSnsFriend.szUserName)); } CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, 1, 0, 0u, false); } if (stNtfChgIntimacyDeny.bIntimacyState == 2) { if (gameOrSnsFriend != null) { strContent = string.Format(UT.FRData().IntimRela_Tips_DenyYourDelLover, UT.Bytes2String(gameOrSnsFriend.szUserName)); } CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, 2, 0, 0u, false); } } Singleton <CUIManager> .GetInstance().OpenTips(strContent, false, 1.5f, null, new object[0]); }
public static void Set_Drop_Text(CUIComponent com, bool bShow, CFR frData) { com.m_widgets[9].CustomSetActive(bShow); string text = string.Empty; CFriendRelationship.FRConfig cFGByIndex = Singleton<CFriendContoller>.instance.model.FRData.GetCFGByIndex(frData.choiseRelation); if (cFGByIndex != null) { text = cFGByIndex.cfgRelaStr; } else { text = UT.FRData().IntimRela_Tips_SelectRelation; } com.m_widgets[9].GetComponent<Text>().set_text(text); }
public static void On_Send_INTIMACY_RELATION_REQUEST(CSPkg msg) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); SCPKG_CMD_INTIMACY_RELATION_REQUEST stIntimacyRelationRequestRsp = msg.stPkgData.get_stIntimacyRelationRequestRsp(); if (stIntimacyRelationRequestRsp.dwResult == 0u) { string strContent = string.Empty; COM_INTIMACY_STATE state = 0; if (stIntimacyRelationRequestRsp.bRelationChgType == 1) { if (stIntimacyRelationRequestRsp.bIntimacyState == 1) { state = 20; strContent = UT.FRData().IntimRela_Tips_SendRequestGaySuccess; } else if (stIntimacyRelationRequestRsp.bIntimacyState == 2) { state = 22; strContent = UT.FRData().IntimRela_Tips_SendRequestLoverSuccess; } } else if (stIntimacyRelationRequestRsp.bRelationChgType == 2) { if (stIntimacyRelationRequestRsp.bIntimacyState == 1) { state = 21; strContent = UT.FRData().IntimRela_Tips_SendDelGaySuccess; } else if (stIntimacyRelationRequestRsp.bIntimacyState == 2) { state = 23; strContent = UT.FRData().IntimRela_Tips_SendDelLoverSuccess; } } Singleton <CUIManager> .GetInstance().OpenTips(strContent, false, 1.5f, null, new object[0]); CFriendRelationship.FRData.Add(stIntimacyRelationRequestRsp.stUin.ullUid, stIntimacyRelationRequestRsp.stUin.dwLogicWorldId, state, stIntimacyRelationRequestRsp.bRelationChgType, 0u, false); } else { Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stIntimacyRelationRequestRsp.dwResult), false, 1.5f, null, new object[0]); } }
public static string GetMiddleTextStr(COM_INTIMACY_STATE state) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); string text = string.Empty; if (state == 1) { text = UT.FRData().IntimRela_Type_Gay; return(string.Format(UT.FRData().IntimRela_Tips_MidText, masterRoleInfo.Name, text)); } if (state == 2) { text = UT.FRData().IntimRela_Type_Lover; return(string.Format(UT.FRData().IntimRela_Tips_MidText, masterRoleInfo.Name, text)); } return(string.Empty); }
public static void Show_Item_Middle(CUIComponent com, CFR frData) { IntimacyRelationViewUT.SetButtonParam(com.m_widgets[16], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[14], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[12], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[7], frData); int cDDays = frData.CDDays; if (cDDays != -1) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, string.Format(UT.FRData().IntimRela_CD_CountDown, cDDays)); return; } if (frData.state == 24 && cDDays == -1) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(true); com.m_widgets[10].CustomSetActive(false); IntimacyRelationViewUT.Set_Drop_Text(com, !frData.bInShowChoiseRelaList, frData); IntimacyRelationViewUT.Set_Drop_List(com, frData.bInShowChoiseRelaList); IntimacyRelationViewUT.Set_Middle_Text(com, false, string.Empty); } if (frData.state == 1 || frData.state == 2) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, IntimacyRelationViewUT.GetMiddleTextStr(frData.state)); } if (frData.state == 20 || frData.state == 22) { if (frData.bReciveOthersRequest) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); string text = string.Empty; if (frData.state == 20) { text = UT.FRData().IntimRela_Type_Gay; } if (frData.state == 22) { text = UT.FRData().IntimRela_Type_Lover; } string txt = string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherReqRela, UT.Bytes2String(frData.friendInfo.szUserName), text); IntimacyRelationViewUT.Set_Middle_Text(com, true, txt); } else { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspReqRela); } } if (frData.state == 21 || frData.state == 23) { if (frData.bReciveOthersRequest) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); string text2 = string.Empty; if (frData.state == 21) { text2 = UT.FRData().IntimRela_Type_Gay; } if (frData.state == 23) { text2 = UT.FRData().IntimRela_Type_Lover; } IntimacyRelationViewUT.Set_Middle_Text(com, true, string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherDelRela, UT.Bytes2String(frData.friendInfo.szUserName), text2)); } else { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspDelRela); } } }
public static void Show_Item_Bottom(CUIComponent com, CFR frData) { IntimacyRelationViewUT.SetButtonParam(com.m_widgets[12], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[14], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[16], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[20], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[22], frData); int cDDays = frData.CDDays; if (cDDays != -1) { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, true, UT.FRData().IntimRela_Tips_RelaHasDel); return; } if (frData.state == 24 && cDDays == -1) { com.m_widgets[11].CustomSetActive(true); string intimRela_Tips_OK = UT.FRData().IntimRela_Tips_OK; string intimRela_Tips_Cancle = UT.FRData().IntimRela_Tips_Cancle; IntimacyRelationViewUT.Set_DoSelect_Button(com, frData.choiseRelation != -1, intimRela_Tips_OK); IntimacyRelationViewUT.Set_2_Button(com, false, false, intimRela_Tips_Cancle, intimRela_Tips_OK); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty); } if (frData.state == 1 || frData.state == 2) { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); COM_INTIMACY_STATE firstChoiseState = Singleton <CFriendContoller> .get_instance().model.FRData.GetFirstChoiseState(); if (firstChoiseState == frData.state) { IntimacyRelationViewUT.Set_Bottom_Text(com, true, UT.FRData().IntimRela_AleadyFristChoise); } else { IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty); IntimacyRelationViewUT.Set_1_Button(com, true, UT.FRData().IntimRela_DoFristChoise); } } if (frData.state == 20 || frData.state == 22) { if (frData.bReciveOthersRequest) { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, true, true, UT.FRData().IntimRela_Tips_Cancle, UT.FRData().IntimRela_Tips_OK); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty); IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); } else { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, false, UT.FRData().IntimRela_Tips_Wait4TargetRspReqRela); IntimacyRelationViewUT.Set_ReSelect_Button(com, true, UT.FRData().IntimRela_ReselectRelation); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); } } if (frData.state == 21 || frData.state == 23) { if (frData.bReciveOthersRequest) { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, true, true, UT.FRData().IntimRela_Tips_Cancle, UT.FRData().IntimRela_Tips_OK); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty); IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); } else { com.m_widgets[11].CustomSetActive(true); IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty); IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty); IntimacyRelationViewUT.Set_Bottom_Text(com, false, UT.FRData().IntimRela_Tips_Wait4TargetRspDelRela); IntimacyRelationViewUT.Set_ReSelect_Button(com, true, UT.FRData().IntimRela_ReDelRelation); IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty); } } }
public void Open() { Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Menu_Close, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Menu_Close)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Show_Drop_List, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Show_Drop_List)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Drop_ListElement_Click, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Drop_ListElement_Click)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Drop_ListElement_Enable, new CUIEventManager.OnUIEventHandler(this.On_Drop_ListElement_Enable)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_OK, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_OK)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Cancle, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Cancle)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Item_Enable, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRelation_Item_Enable)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_FristChoise, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_FristChoise)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Delete_Relation, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Delete_Relation)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_PrevState, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_PrevState)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_Delete_Relation_OK, new CUIEventManager.OnUIEventHandler(this.On_IntimacyRela_Delete_Relation_OK)); Singleton <EventRouter> .GetInstance().AddEventHandler("FRDataChange", new Action(this.On_FRDataChange)); this.form = Singleton <CUIManager> .GetInstance().OpenForm(CFriendContoller.IntimacyRelaFormPath, false, true); this.listScript = this.form.transform.FindChild("GameObject/list").GetComponent <CUIListScript>(); this.form.transform.FindChild("GameObject/info/txt").GetComponent <Text>().set_text(UT.FRData().IntimRela_EmptyDataText); this.Refresh(); }
public void ShowIntimacyNum(int value, CFriendModel.EIntimacyType type, bool bFreeze, COM_INTIMACY_STATE state) { GameObject gameObject = this.full.transform.parent.FindChild("rela").gameObject; if (state == 1 || state == 2 || state == 21 || state == 23) { this.intimacyNum.gameObject.CustomSetActive(false); this.freeze.CustomSetActive(false); this.full.CustomSetActive(false); this.high.CustomSetActive(false); this.mid.CustomSetActive(false); this.low.CustomSetActive(false); gameObject.CustomSetActive(true); if (state == 1 || state == 21) { Utility.FindChild(gameObject, "jiyou").gameObject.CustomSetActive(true); Utility.FindChild(gameObject, "lianren").gameObject.CustomSetActive(false); Text componetInChild = Utility.GetComponetInChild <Text>(gameObject, "txt"); if (componetInChild != null) { componetInChild.gameObject.CustomSetActive(true); componetInChild.text = UT.FRData().IntimRela_TypeColor_Gay; } } else if (state == 2 || state == 23) { Utility.FindChild(gameObject, "jiyou").gameObject.CustomSetActive(false); Utility.FindChild(gameObject, "lianren").gameObject.CustomSetActive(true); Text componetInChild2 = Utility.GetComponetInChild <Text>(gameObject, "txt"); if (componetInChild2 != null) { componetInChild2.gameObject.CustomSetActive(true); componetInChild2.text = UT.FRData().IntimRela_TypeColor_Lover; } } return; } gameObject.CustomSetActive(false); if (this.intimacyNum != null) { this.intimacyNum.gameObject.CustomSetActive(true); if ((long)value >= (long)((ulong)Singleton <CFriendContoller> .get_instance().model.GetMaxIntimacyNum())) { this.intimacyNum.text = "Max"; } else { this.intimacyNum.text = value.ToString(); } } if (bFreeze) { this.freeze.CustomSetActive(true); this.intimacyNum.color = CUIUtility.Intimacy_Freeze; } else { if (this.freeze != null) { this.freeze.CustomSetActive(false); } if (type == CFriendModel.EIntimacyType.Low) { if (this.full != null) { this.full.CustomSetActive(false); } if (this.high != null) { this.high.CustomSetActive(false); } if (this.mid != null) { this.mid.CustomSetActive(false); } if (this.low != null) { this.low.CustomSetActive(true); } this.intimacyNum.color = CUIUtility.Intimacy_Low; } else if (type == CFriendModel.EIntimacyType.Middle) { if (this.full != null) { this.full.CustomSetActive(false); } if (this.high != null) { this.high.CustomSetActive(false); } if (this.mid != null) { this.mid.CustomSetActive(true); } if (this.low != null) { this.low.CustomSetActive(false); } this.intimacyNum.color = CUIUtility.Intimacy_Mid; } else if (type == CFriendModel.EIntimacyType.High) { if (this.full != null) { this.full.CustomSetActive(false); } if (this.high != null) { this.high.CustomSetActive(true); } if (this.mid != null) { this.mid.CustomSetActive(false); } if (this.low != null) { this.low.CustomSetActive(false); } this.intimacyNum.color = CUIUtility.Intimacy_High; } else if (type == CFriendModel.EIntimacyType.full) { if (this.full != null) { this.full.CustomSetActive(true); } if (this.high != null) { this.high.CustomSetActive(false); } if (this.mid != null) { this.mid.CustomSetActive(false); } if (this.low != null) { this.low.CustomSetActive(false); } this.intimacyNum.color = CUIUtility.Intimacy_Full; } } }
public static void Show_Item_Middle(CUIComponent com, CFR frData, CUIFormScript uiFrom) { IntimacyRelationViewUT.SetButtonParam(com.m_widgets[16], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[14], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[12], frData); IntimacyRelationViewUT.SetButtonParam(com.m_widgets[7], frData); int cDDays = frData.CDDays; GameObject obj = Utility.FindChild(com.gameObject, "mengban"); obj.CustomSetActive(cDDays != -1); if (cDDays != -1) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, string.Format(UT.FRData().IntimRela_CD_CountDown, cDDays), false); return; } if (frData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL && cDDays == -1) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(true); com.m_widgets[10].CustomSetActive(false); IntimacyRelationViewUT.Set_Drop_Text(com, !frData.bInShowChoiseRelaList, frData); IntimacyRelationViewUT.Set_Drop_List(com, frData.bInShowChoiseRelaList); IntimacyRelationViewUT.Set_Middle_Text(com, false, string.Empty, false); } if (IntimacyRelationViewUT.IsRelaState(frData.state)) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, IntimacyRelationViewUT.GetMiddleTextStr(frData.state), true); ushort num; CFriendModel.EIntimacyType eIntimacyType; bool flag; Singleton<CFriendContoller>.instance.model.GetFriendIntimacy(frData.ulluid, frData.worldID, out num, out eIntimacyType, out flag); if (num > 0) { int relaLevel = IntimacyRelationViewUT.CalcRelaLevel((int)num); string relaIconByRelaLevel = IntimacyRelationViewUT.GetRelaIconByRelaLevel(relaLevel, frData.state); if (!string.IsNullOrEmpty(relaIconByRelaLevel)) { GameObject p = com.m_widgets[10]; GameObject gameObject = Utility.FindChild(p, "Icon"); if (gameObject != null) { Image component = gameObject.GetComponent<Image>(); if (component != null) { component.gameObject.CustomSetActive(true); component.SetSprite(relaIconByRelaLevel, uiFrom, true, false, false, false); component.SetNativeSize(); } } } } } if (IntimacyRelationViewUT.IsRelaStateConfirm(frData.state)) { if (frData.bReciveOthersRequest) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); COM_INTIMACY_STATE stateByConfirmState = IntimacyRelationViewUT.GetStateByConfirmState(frData.state); string relationText = IntimacyRelationViewUT.GetRelationText(stateByConfirmState); string txt = string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherReqRela, UT.Bytes2String(frData.friendInfo.szUserName), relationText); IntimacyRelationViewUT.Set_Middle_Text(com, true, txt, false); } else { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspReqRela, false); } } if (IntimacyRelationViewUT.IsRelaStateDeny(frData.state)) { if (frData.bReciveOthersRequest) { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); COM_INTIMACY_STATE stateByDenyState = IntimacyRelationViewUT.GetStateByDenyState(frData.state); string relationText2 = IntimacyRelationViewUT.GetRelationText(stateByDenyState); string txt2 = string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherDelRela, UT.Bytes2String(frData.friendInfo.szUserName), relationText2); IntimacyRelationViewUT.Set_Middle_Text(com, true, txt2, false); } else { com.m_widgets[5].CustomSetActive(true); com.m_widgets[6].CustomSetActive(false); IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspDelRela, false); } } }