예제 #1
0
    // 点击确认按钮
    public void OnEnterBtn(GameObject obj)
    {
        GameObject inputFriendID = FindChild("WebSiteInputFriendID");
        UIInput    inputComponet = inputFriendID.transform.GetComponent <UIInput>();

        //Debug.Log(("uifoundFriendByID-----------------:" + inputComponet.value));
        //MiniServer.Singleton.SendLookupPlayer_C2CE((int)inputComponet.value);
        if (inputComponet.value == "")
        {
            Debug.Log("------------------------Shu123321123");
            return;
        }
        int tmpFriendID = int.Parse(inputComponet.value);

        if (tmpFriendID == User.Singleton.GetUserID())
        {
            //弹出二次提示框Error Self
            UIFriendMsgBoxCfg boxCfg        = FindChild("Button_Enter").GetComponent <UIFriendMsgBoxCfg>();
            UIFriendCfgItem   friendCfgItem = boxCfg.ItemList[(int)FoundFriendByID.ENMsgInfoType.enErrorSelf];
            UIFriendMessageBox.GetInstance().ShowMsgBox(OnButtonYes, OnButtonNo, OnButtonRefuserBtn, friendCfgItem);
            return;
        }
        //OnShowMsgBox(FoundFriendByID.ENMsgInfoType.enErrorID);
        //向服务器发送带查找好友ID
        int msgID = MiniServer.Singleton.SendLookupPlayer_C2CE(tmpFriendID);

        RegisterRespondFuncByMessageID(msgID, OnPlayerIDNotFound);

        //加载loading界面
        //Loading.Singleton.Show();
    }
예제 #2
0
    //点击FriendItem人物信息回调
    public void OnClickPlayer(object sender, EventArgs e)
    {
        GameObject obj   = (GameObject)sender;
        Parma      parma = obj.transform.parent.GetComponent <Parma>();

        Debug.Log("OnClickIPlayer---------------------" + parma.m_id);
        UIFriendItem friendItem = CreateFriendItemPrefab((FriendItem)FriendList.Singleton.m_friendInfoList[parma.m_id]);

        UIFriendMessageBox.GetInstance().InsertUIWnd(friendItem);
        UIFriendMsgBoxCfg FriendboxCfg  = FindChild("InnerFrame").GetComponent <UIFriendMsgBoxCfg>();
        UIFriendCfgItem   friendCfgItem = FriendboxCfg.ItemList[0];

        UIFriendMessageBox.GetInstance().ShowMsgBox(OnButtonYes, OnButtonNo, OnButtonRefuserBtn, friendCfgItem);
    }
예제 #3
0
    public void OnShowMsgBox(FoundFriendByID.ENMsgInfoType msgType)
    {
        switch (msgType)
        {
        case FoundFriendByID.ENMsgInfoType.enErrorID:
            break;

        case FoundFriendByID.ENMsgInfoType.enSuccess:
            /*Loading.Singleton.Hide();*/
            UIFriendItem friendItem = CreateFriendItemPrefab();
            UIFriendMessageBox.GetInstance().InsertUIWnd(friendItem);
            UIFriendMsgBoxCfg FriendboxCfg  = FindChild("Button_Enter").GetComponent <UIFriendMsgBoxCfg>();
            UIFriendCfgItem   friendCfgItem = FriendboxCfg.ItemList[(int)FoundFriendByID.ENMsgInfoType.enSuccess];
            UIFriendMessageBox.GetInstance().ShowMsgBox(OnButtonYes, OnButtonNo, OnButtonRefuserBtn, friendCfgItem);
            break;

        default:
            break;
        }
    }