Browse Source

Minimal modifications to ParticlesGame and RacerGame so that their menus are usable with a gamepad.
Change to sliders so that they consume all gamepad events while active.

Adam Blake 13 years ago
parent
commit
d6ca220f86
2 changed files with 5 additions and 5 deletions
  1. 3 3
      gameplay/src/Game.cpp
  2. 2 2
      gameplay/src/Slider.cpp

+ 3 - 3
gameplay/src/Game.cpp

@@ -349,12 +349,12 @@ void Game::frame()
         // Update gamepads.
         Gamepad::updateInternal(0);
 
-        // Update forms.
-        Form::updateInternal(0);
-
         // Application Update.
         update(0);
 
+        // Update forms.
+        Form::updateInternal(0);
+
         // Script update.
         _scriptController->update(0);
 

+ 2 - 2
gameplay/src/Slider.cpp

@@ -316,7 +316,7 @@ bool Slider::gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned
                 }
 
                 // A slider consumes all button events until it is no longer active.
-                eventConsumed |= _consumeInputEvents;
+                eventConsumed = true;
                 _dirty = true;
                 break;
             }
@@ -330,7 +330,7 @@ bool Slider::gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned
                     _gamepadValue = _value;
                     _delta = joy.x;
                     _dirty = true;
-                    eventConsumed |= _consumeInputEvents;
+                    eventConsumed = true;
                 }
                 break;
             }