Exemple #1
0
        private void OpenVirtualKeyboardWhenNeeded()
        {
            int maxInputLength = 40;
            UIVirtualKeyboard uIVirtualKeyboard = new UIVirtualKeyboard(Language.GetText("UI.PlayerNameSlot").Value, _searchString, OnFinishedSettingName, GoBackHere, 0, allowEmpty: true);

            uIVirtualKeyboard.SetMaxInputLength(maxInputLength);
            UserInterface.ActiveInstance.SetState(uIVirtualKeyboard);
        }
Exemple #2
0
        private void OpenVirtualKeyboardWhenNeeded()
        {
            int length = 40;
            UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Language.GetText("UI.PlayerNameSlot").Value, this._searchString, new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingName), new Action(this.GoBackHere), 0, true);

            uiVirtualKeyboard.SetMaxInputLength(length);
            UserInterface.ActiveInstance.SetState((UIState)uiVirtualKeyboard);
        }
Exemple #3
0
        private void Click_SetSeed(UIMouseEvent evt, UIElement listeningElement)
        {
            SoundEngine.PlaySound(10);
            Main.clrInput();
            UIVirtualKeyboard uIVirtualKeyboard = new UIVirtualKeyboard(Language.GetTextValue("UI.EnterSeed"), "", OnFinishedSettingSeed, GoBackHere, 0, allowEmpty: true);

            uIVirtualKeyboard.SetMaxInputLength(40);
            Main.MenuUI.SetState(uIVirtualKeyboard);
        }
Exemple #4
0
        private void Click_SetName(UIMouseEvent evt, UIElement listeningElement)
        {
            SoundEngine.PlaySound(10);
            Main.clrInput();
            UIVirtualKeyboard uIVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", OnFinishedSettingName, GoBackHere, 0, allowEmpty: true);

            uIVirtualKeyboard.SetMaxInputLength(27);
            Main.MenuUI.SetState(uIVirtualKeyboard);
        }
Exemple #5
0
        private void Click_SetSeed(UIMouseEvent evt, UIElement listeningElement)
        {
            SoundEngine.PlaySound(10, -1, -1, 1, 1f, 0.0f);
            Main.clrInput();
            UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Language.GetTextValue("UI.EnterSeed"), "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingSeed), new Action(this.GoBackHere), 0, true);

            uiVirtualKeyboard.SetMaxInputLength(40);
            Main.MenuUI.SetState((UIState)uiVirtualKeyboard);
        }
Exemple #6
0
        private void Click_SetName(UIMouseEvent evt, UIElement listeningElement)
        {
            SoundEngine.PlaySound(10, -1, -1, 1, 1f, 0.0f);
            Main.clrInput();
            UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingName), new Action(this.GoBackHere), 0, true);

            uiVirtualKeyboard.SetMaxInputLength(27);
            Main.MenuUI.SetState((UIState)uiVirtualKeyboard);
        }
Exemple #7
0
 private void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement)
 {
     SoundEngine.PlaySound(10);
     if (string.IsNullOrEmpty(_optionwWorldName))
     {
         _optionwWorldName = "";
         Main.clrInput();
         UIVirtualKeyboard uIVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", OnFinishedNamingAndCreating, GoBackHere);
         uIVirtualKeyboard.SetMaxInputLength(27);
         Main.MenuUI.SetState(uIVirtualKeyboard);
     }
     else
     {
         FinishCreatingWorld();
     }
 }
Exemple #8
0
 private void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement)
 {
     SoundEngine.PlaySound(10, -1, -1, 1, 1f, 0.0f);
     if (string.IsNullOrEmpty(this._optionwWorldName))
     {
         this._optionwWorldName = "";
         Main.clrInput();
         UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedNamingAndCreating), new Action(this.GoBackHere), 0, false);
         uiVirtualKeyboard.SetMaxInputLength(27);
         Main.MenuUI.SetState((UIState)uiVirtualKeyboard);
     }
     else
     {
         this.FinishCreatingWorld();
     }
 }