private static void RestorePlayerBindings()
        {
            GameInput.Initialize();
            if (origControllerHasFocus.HasValue)
            {
                MInputControllerHasFocus?.SetValue(null, origControllerHasFocus.Value);
                origControllerHasFocus = null;
            }

            Celeste.Mod.Core.CoreModule.Settings.UseKeyboardForTextInput = kbTextInput;
        }
Exemple #2
0
        public static void SetTasBindings()
        {
            Settings settingsBackup = Settings.Instance.ShallowClone();

            if (BindingType == null)
            {
                SetTasBindingsV1312();
            }
            else
            {
                SetTasBindingsNew();
            }

            GameInput.Initialize();
            Settings.Instance.CopyAllFields(settingsBackup);
        }
        private static void SetTasBindingsV1312()
        {
            DynData <Settings> settings = Settings.Instance.GetDynDataInstance();

            settings.Set("Left", Keys.None);
            settings.Set("Right", Keys.None);
            settings.Set("Down", Keys.None);
            settings.Set("Up", Keys.None);

            settings.Set("Grab", new List <Keys>());
            settings.Set("Jump", new List <Keys>());
            settings.Set("Dash", new List <Keys>());
            settings.Set("Talk", new List <Keys>());
            settings.Set("Pause", new List <Keys>());
            settings.Set("Confirm", new List <Keys> {
                Confirm2
            });
            settings.Set("Cancel", new List <Keys>());
            settings.Set("Journal", new List <Keys>());
            settings.Set("QuickRestart", new List <Keys>());

            settings.Set("BtnGrab", new List <Buttons> {
                Grab
            });
            settings.Set("BtnJump", new List <Buttons> {
                JumpAndConfirm, Jump2
            });
            settings.Set("BtnDash", new List <Buttons> {
                DashAndTalkAndCancel, Dash2AndCancel
            });
            settings.Set("BtnTalk", new List <Buttons> {
                DashAndTalkAndCancel
            });
            settings.Set("BtnAltQuickRestart", new List <Buttons>());

            GameInput.Initialize();

            GameInput.QuickRestart.AddButtons(new List <Buttons> {
                QuickRestart
            });
        }
Exemple #4
0
        private static void SetTasBindingsNew()
        {
            SetBinding("Left", Buttons.LeftThumbstickLeft, Buttons.DPadLeft);
            SetBinding("Right", Buttons.LeftThumbstickRight, Buttons.DPadRight);
            SetBinding("Down", Buttons.LeftThumbstickDown, Buttons.DPadDown);
            SetBinding("Up", Buttons.LeftThumbstickUp, Buttons.DPadUp);

            SetBinding("MenuLeft", Buttons.LeftThumbstickLeft, Buttons.DPadLeft);
            SetBinding("MenuRight", Buttons.LeftThumbstickRight, Buttons.DPadRight);
            SetBinding("MenuDown", Buttons.LeftThumbstickDown, Buttons.DPadDown);
            SetBinding("MenuUp", Buttons.LeftThumbstickUp, Buttons.DPadUp);

            SetBinding("Grab", Grab);
            SetBinding("Jump", JumpAndConfirm, Jump2);
            SetBinding("Dash", DashAndTalkAndCancel, Dash2AndCancel);
            SetBinding("Talk", DashAndTalkAndCancel);

            SetBinding("Pause", Pause);
            SetBinding("Confirm", new[] { Keys.Enter }, JumpAndConfirm);
            SetBinding("Cancel", DashAndTalkAndCancel, Dash2AndCancel);

            SetBinding("Journal", Journal);
            SetBinding("QuickRestart", QuickRestart);

            SetBinding("DemoDash", DemoDash);

            SetBinding("RightMoveOnly");
            SetBinding("LeftMoveOnly");
            SetBinding("UpMoveOnly");
            SetBinding("DownMoveOnly");

            SetBinding("RightDashOnly");
            SetBinding("LeftDashOnly");
            SetBinding("UpDashOnly");
            SetBinding("DownDashOnly");

            GameInput.Initialize();
        }
Exemple #5
0
 public static void RestorePlayerBindings()
 {
     GameInput.Initialize();
 }