コード例 #1
0
    private void OnClickItem()
    {
        if (isOpened == false)
        {
            isOpened = true;
            if (!NGUITools.GetActive(mStateOpen.gameObject))
            {
                NGUITools.SetActive(mStateOpen.gameObject, true);
            }
            if (NGUITools.GetActive(mStateClose.gameObject))
            {
                NGUITools.SetActive(mStateClose.gameObject, false);
            }
            MailActionParam param = new MailActionParam();
            param.mailid = mMaildata.mailid;
            Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_MAIL_STATE_OPENED, param);
        }
        MailModule module = ModuleManager.Instance.FindModule <MailModule>();

        module.SelectedMail = this;
        ShowMailContent(mMaildata);
        UIWindow MailUI     = WindowManager.Instance.GetUI("mail");
        UIButton mDeleteBtn = MailUI.FindComponent <UIButton>("background/mGiveUpBtn");
        UIButton mPickBtn   = MailUI.FindComponent <UIButton>("background/mGetBtn");

        UIAtlasHelper.SetButtonImage(mDeleteBtn, "common:btn_blue_4word", true);
        if (mMaildata.itemcnt > 0 && mMaildata.mItemsList != null && !isPicked)
        {
            UIAtlasHelper.SetButtonImage(mPickBtn, "common:btn_yellow_4word", true);
        }
    }
コード例 #2
0
 public void OnPickItem()
 {
     if (!isPicked)
     {
         MailActionParam param = new MailActionParam();
         param.mailid = mMaildata.mailid;
         Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_MAIL_STATE_PICKED, param);
     }
 }
コード例 #3
0
    public void OnDeleteItem()
    {
        if (NGUITools.GetActive(this.gameObject))
        {
            NGUITools.SetActive(this.gameObject, false);
        }
        UIWindow MailUI = WindowManager.Instance.GetUI("mail");
        UIGrid   mGrid  = MailUI.FindComponent <UIGrid>("ScrollView/UIGrid");

        mGrid.Reposition();
        mGrid.repositionNow = true;
        if (mMaildata.state != 0)
        {
            MailActionParam param = new MailActionParam();
            param.mailid = mMaildata.mailid;
            Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_MAIL_STATE_DELETE, param);
        }
        MailModule module = ModuleManager.Instance.FindModule <MailModule>();

        module.SelectedMail = null;
        HideMailContent();
    }
コード例 #4
0
    protected override void OnRequest(request_mail_state request, object userdata)
    {
        MailActionParam param = userdata as MailActionParam;

        request.mailguid = param.mailid.ToMSGGuid();
    }