Ejemplo n.º 1
0
        // Token: 0x06004626 RID: 17958 RVA: 0x0017D588 File Offset: 0x0017B988
        public void ShowDialogExtended()
        {
            Dialog        dialog        = Dialog.Template("DialogTemplateSample");
            string        title         = "Another Dialog";
            string        message       = "Same template with another position and long text.\nChange\nheight\nto\nfit\ntext.";
            DialogActions dialogActions = new DialogActions();

            dialogActions.Add("Show notification", new Func <bool>(this.CallShowNotifyAutohide));
            dialogActions.Add("Open simple dialog", new Func <bool>(this.CallShowDialogSimple));
            DialogActions dialogActions2 = dialogActions;
            string        key            = "Close";

            if (UITestSamples.f__mg4 == null)
            {
                UITestSamples.f__mg4 = new Func <bool>(Dialog.Close);
            }
            dialogActions2.Add(key, UITestSamples.f__mg4);
            dialog.Show(title, message, dialogActions, "Show notification", new Vector3?(new Vector3(40f, -40f, 0f)), null, false, null, null, null);
        }
Ejemplo n.º 2
0
        public DialogActions GetNewAction(EMessageBoxType _eType, Func <bool> _okCallback, Func <bool> _cancelCallback)
        {
            DialogActions result = new DialogActions();

            if ((_eType & EMessageBoxType.EMBT_OK) > 0)
            {
                result.Add(ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), _okCallback);
            }
            else if ((_eType & EMessageBoxType.EMBT_Cancel) > 0)
            {
                result.Add(ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), _cancelCallback);
            }
            else if ((_eType & EMessageBoxType.EMBT_OKCancel) > 0)
            {
                result.Add(ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), _okCallback);
                result.Add(ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), _cancelCallback);
            }

            return(result);
        }
Ejemplo n.º 3
0
        // Token: 0x06004625 RID: 17957 RVA: 0x0017D4D4 File Offset: 0x0017B8D4
        public void ShowDialogYesNoCancel()
        {
            Dialog        dialog        = Dialog.Template("DialogTemplateSample");
            string        title         = "Dialog Yes No Cancel";
            string        message       = "Question?";
            DialogActions dialogActions = new DialogActions();

            dialogActions.Add("Yes", new Func <bool>(this.ShowNotifyYes));
            dialogActions.Add("No", new Func <bool>(this.ShowNotifyNo));
            DialogActions dialogActions2 = dialogActions;
            string        key            = "Cancel";

            if (UITestSamples.f__mg3 == null)
            {
                UITestSamples.f__mg3 = new Func <bool>(Dialog.Close);
            }
            dialogActions2.Add(key, UITestSamples.f__mg3);
            dialogActions = dialogActions;
            string focusButton = "Yes";
            Sprite icon        = this.questionIcon;

            dialog.Show(title, message, dialogActions, focusButton, null, icon, false, null, null, null);
        }
Ejemplo n.º 4
0
        // Token: 0x06004623 RID: 17955 RVA: 0x0017D458 File Offset: 0x0017B858
        public void ShowDialogSimple()
        {
            Dialog        dialog         = Dialog.Template("DialogTemplateSample");
            string        title          = "Simple Dialog";
            string        message        = "Simple dialog with only close button.";
            DialogActions dialogActions  = new DialogActions();
            DialogActions dialogActions2 = dialogActions;
            string        key            = "Close";

            if (UITestSamples.f__mg2 == null)
            {
                UITestSamples.f__mg2 = new Func <bool>(Dialog.Close);
            }
            dialogActions2.Add(key, UITestSamples.f__mg2);
            dialog.Show(title, message, dialogActions, "Close", null, null, false, null, null, null);
        }
Ejemplo n.º 5
0
        // Token: 0x06004627 RID: 17959 RVA: 0x0017D638 File Offset: 0x0017BA38
        public void ShowDialogModal()
        {
            Dialog        dialog         = Dialog.Template("DialogTemplateSample");
            string        title          = "Modal Dialog";
            string        message        = "Simple Modal Dialog.";
            DialogActions dialogActions  = new DialogActions();
            DialogActions dialogActions2 = dialogActions;
            string        key            = "Close";

            if (UITestSamples.f__mg5 == null)
            {
                UITestSamples.f__mg5 = new Func <bool>(Dialog.Close);
            }
            dialogActions2.Add(key, UITestSamples.f__mg5);
            dialogActions = dialogActions;
            string focusButton = "Close";
            Color? modalColor  = new Color?(new Color(0f, 0f, 0f, 0.8f));

            dialog.Show(title, message, dialogActions, focusButton, null, null, true, null, modalColor, null);
        }
Ejemplo n.º 6
0
        // Token: 0x06004628 RID: 17960 RVA: 0x0017D6CC File Offset: 0x0017BACC
        public void ShowDialogSignIn()
        {
            Dialog            dialog = Dialog.Template("DialogSignInTemplateSample");
            DialogInputHelper helper = dialog.GetComponent <DialogInputHelper>();

            helper.Refresh();
            Dialog        dialog2       = dialog;
            string        title         = "Sign into your Account";
            DialogActions dialogActions = new DialogActions();

            dialogActions.Add("Sign in", () => this.SignInNotify(helper));
            DialogActions dialogActions2 = dialogActions;
            string        key            = "Cancel";

            if (UITestSamples.f__mg6 == null)
            {
                UITestSamples.f__mg6 = new Func <bool>(Dialog.Close);
            }
            dialogActions2.Add(key, UITestSamples.f__mg6);
            dialogActions = dialogActions;
            Color?modalColor = new Color?(new Color(0f, 0f, 0f, 0.8f));

            dialog2.Show(title, null, dialogActions, "Sign in", null, null, true, null, modalColor, null);
        }