public override void HandleInput(InputState input, GameTime gameTime)
        {
            // Move to the previous menu entry?
            if (input.IsKeyUp() || input.IsKeyRight())
            {
                selectedMajorMenuEntry--;
                screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);
                if (selectedMajorMenuEntry < 0) { selectedMajorMenuEntry++; }
                else if (selectedMajorMenuEntry < topDisplayedEntryIndex) { topDisplayedEntryIndex--; botDisplayedEntryIndex--; }
            }

            // Move to the next menu entry?
            if (input.IsKeyDown() || input.IsKeyLeft())
            {
                selectedMajorMenuEntry++;
                screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);
                if (selectedMajorMenuEntry > MenuEntries.Count - 1) { selectedMajorMenuEntry--; }
                else if (selectedMajorMenuEntry > botDisplayedEntryIndex) { topDisplayedEntryIndex++; botDisplayedEntryIndex++; }
            }

            // Handle selecting menu entries to proceed to next screen, or exiting from this screen.
            if (input.IsMenuSelect())
            {
            }
            else if (input.IsMenuCancel())
            {
                ExitScreen();
            }
        }
 protected void HandleTargetSelection(InputState input)
 {
     if (input.IsKeyUp())
     {
         selectedTarget--;
         if (selectedTarget < 0)
             selectedTarget = OwnerScreen.BattleMembers.Count - 1;
     }
     if (input.IsKeyDown())
     {
         selectedTarget++;
         if (selectedTarget >= OwnerScreen.BattleMembers.Count())
             selectedTarget = 0;
     }
     if (input.IsMenuSelect())
     {
         // Logic to do with performing an action...
         CurrentCombatAction.PerformAction(this, OwnerScreen.BattleMembers[selectedTarget], CurrentCombatAction);
         // Reset shit so it doesn't stick on any menu.
         selectingTarget = false;
         // Go go go.
         OwnerScreen.AdvanceTurn();
     }
 }
        protected void HandleActionMenuInput(InputState input)
        {
            // Move to the previous menu entry?
            if (input.IsKeyUp())
            {
                selectedAction--;
                //screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);

                if (selectedAction < 0)
                    selectedAction = CombatActions.Count() - 1;
            }

            // Move to the next menu entry?
            if (input.IsKeyDown())
            {
                selectedAction++;
                //screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);

                if (selectedAction >= CombatActions.Count())
                    selectedAction = 0;
            }

            // Handle selecting menu entries to proceed to next screen, or exiting from this screen.
            if (input.IsMenuSelect())
            {
                OnSelectAction(selectedAction);
            }

            //else if (input.IsMenuCancel())
            //{
            //    OnCancel();
            //}
        }
Пример #4
0
        protected void HandleMajorMenuEntryInput(InputState input)
        {
            // Move to the previous menu entry?
            if (input.IsKeyUp() || input.IsKeyLeft())
            {
                selectedMajorMenuEntry--;
                AudioManager.PlaySound("beep");

                if (selectedMajorMenuEntry < 0)
                    selectedMajorMenuEntry = menuEntries.Count - 1;
            }

            // Move to the next menu entry?
            if (input.IsKeyDown() || input.IsKeyRight())
            {
                selectedMajorMenuEntry++;
                AudioManager.PlaySound("beep");

                if (selectedMajorMenuEntry >= menuEntries.Count)
                    selectedMajorMenuEntry = 0;
            }

            // Handle selecting menu entries to proceed to next screen, or exiting from this screen.
            if (input.IsMenuSelect())
            {
                OnSelectMajorMenuEntry(selectedMajorMenuEntry);
            }
            else if (input.IsMenuCancel())
            {
                OnCancel();
            }
        }
Пример #5
0
        public override void HandleInput(InputState input, GameTime gameTime)
        {
            // Move to the previous menu entry?
            if (input.IsKeyUp() || input.IsKeyRight())
            {
                selectedMajorMenuEntry--;
                AudioManager.PlaySound("beep");

                if (selectedMajorMenuEntry < 0)
                    selectedMajorMenuEntry = MenuEntries.Count - 1;
            }

            // Move to the next menu entry?
            if (input.IsKeyDown() || input.IsKeyLeft())
            {
                selectedMajorMenuEntry++;
                AudioManager.PlaySound("beep");

                if (selectedMajorMenuEntry >= MenuEntries.Count)
                    selectedMajorMenuEntry = 0;
            }

            // Handle selecting menu entries to proceed to next screen, or exiting from this screen.
            if (input.IsMenuSelect())
            {
            }
            else if (input.IsMenuCancel())
            {
                ExitScreen();
            }
        }
Пример #6
0
        public override void HandleInput(InputState input, GameTime gameTime)
        {
            // Move to the previous menu entry?
            if (input.IsKeyUp())
            {
                selectedEntry--;
                screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);

                if (selectedEntry < 0)
                    selectedEntry = menuEntries.Count - 1;
            }

            // Move to the next menu entry?
            if (input.IsKeyDown())
            {
                selectedEntry++;
                screenManager.MenuItemSound.Play(0.5f, 0.0f, 0.0f);

                if (selectedEntry >= menuEntries.Count)
                    selectedEntry = 0;
            }

            // Handle selecting menu entries to proceed to next screen, or exiting from this screen.
            if (input.IsMenuSelect())
            {
                OnSelectEntry(selectedEntry);
            }
            else if (input.IsMenuCancel())
            {
                OnCancel();
            }
        }