public override void Update()
 {
     base.Update();
     if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Escape))
     {
         StateManager.OptionsState = OptionStates.Overview;
     }
 }
Exemple #2
0
 public override void Update()
 {
     base.Update();
     if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Escape))
     {
         StateManager.GameState = GameStates.Title;
     }
 }
Exemple #3
0
 public static void HandleGeneralInput()
 {
     if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Escape))
     {
         StateManager.MenuState  = MenuStates.Ingame;
         StateManager.GamePaused = true;
         StateManager.InputLock  = true;
     }
 }
Exemple #4
0
 public override void Update()
 {
     base.Update();
     if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Escape))
     {
         if (StateManager.GamePaused)
         {
             StateManager.MenuState = MenuStates.Ingame;
         }
         else
         {
             StateManager.MenuState = MenuStates.Main;
         }
     }
 }
 public override void Update()
 {
     base.Update();
     if (StateManager.InputLock)
     {
         StateManager.InputLock = false;
     }
     else
     {
         if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Escape))
         {
             StateManager.GamePaused = false;
             StateManager.MenuState  = MenuStates.Null;
         }
     }
 }
Exemple #6
0
        public override void Update()
        {
            if (Confirmation)
            {
                confirmDialog.Update();
                return;
            }

            if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Down))
            {
                NextMenuItem();
            }

            if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Up))
            {
                PreviousMenuItem();
            }

            ResolveMouseSelection();

            if (ShortcutProvider.KeyPressedNowButNotLastFrame(Keys.Enter) || ShortcutProvider.LeftButtonClickedNowButNotLastFrame())
            {
                SelectMenuItem();
            }

            foreach (MenuItem menuItem in menuItems)
            {
                menuItem.Update();
            }
            if (InputMapper.STRICTCANCEL)
            {
                StateManager.MenuState = MenuStates.Main;
            }
            if (TextBuffer.Length == 0)
            {
                menuItems[0].IsSelected = false;
                menuItems[1].IsSelected = true;
            }
        }