コード例 #1
0
ファイル: MessageBox.cs プロジェクト: parikharsh/GLOH_Source
    public virtual MessageBox.Result Show()
    {
        IntroMsgBoxDlg introMsgBoxDlg = (IntroMsgBoxDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INTROMSGBOX_DLG);

        if (introMsgBoxDlg != null)
        {
            introMsgBoxDlg.SetClose(false);
            this._Result = MessageBox.Result.IDLE;
            if (this.MBType == MessageBox.Type.OK)
            {
                introMsgBoxDlg.SetBtnChangeName(this.OK);
                introMsgBoxDlg.SetMsg(new Action <IntroMsgBoxDlg, object>(this._onOK), this, this.Title, this.Message, eMsgType.MB_OK);
            }
            else if (this.MBType == MessageBox.Type.OKCANCEL)
            {
                introMsgBoxDlg.SetBtnChangeName(this.OK, this.CANCEL);
                introMsgBoxDlg.SetMsg(new Action <IntroMsgBoxDlg, object>(this._onOK), this, new Action <IntroMsgBoxDlg, object>(this._onCancel), this, this.Title, this.Message, eMsgType.MB_OK_CANCEL);
            }
            int num  = (int)(GUICamera.width / 2f - introMsgBoxDlg.GetSize().x / 2f);
            int num2 = (int)(GUICamera.height / 2f - introMsgBoxDlg.GetSize().y / 2f);
            introMsgBoxDlg.SetLocation((float)num, (float)num2, 50f);
        }
        return(this._Result);
    }
コード例 #2
0
ファイル: MessageBox.cs プロジェクト: daglundberg/neo
 public ResultButton(Neo neo, MessageBox.Result result) : base(neo)
 {
     Result = result;
     Text   = result.ToString();
 }
コード例 #3
0
ファイル: MessageBox.cs プロジェクト: parikharsh/GLOH_Source
 private void _onCancel(IntroMsgBoxDlg msgBox, object arg)
 {
     this._Result = MessageBox.Result.CANCEL;
     this.OnCancel();
 }
コード例 #4
0
ファイル: MessageBox.cs プロジェクト: parikharsh/GLOH_Source
 private void _onOK(IntroMsgBoxDlg msgBox, object arg)
 {
     this._Result = MessageBox.Result.OK;
     this.OnOK();
 }