Browse Source

Fixes bug in Joystick control where the control was being rendered in the incorrect position (top left corner of the screen) when it was being defined within a container.
Fixes sample03-character gamepad so that controls are relatively positioned instead of absolutely positioned. Buttons now render on screen for resolutions different from the playbook.

Kieran Cunney 13 years ago
parent
commit
32416963e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay/src/Joystick.cpp

+ 1 - 1
gameplay/src/Joystick.cpp

@@ -201,7 +201,7 @@ void Joystick::drawImages(SpriteBatch* spriteBatch, const Rectangle& clip)
     if (_absolute || (!_absolute && _state == ACTIVE))
     if (_absolute || (!_absolute && _state == ACTIVE))
     {
     {
         if (_absolute)
         if (_absolute)
-            _region = _bounds;
+            _region = _viewportClipBounds;
 
 
         // Draw the outer image.
         // Draw the outer image.
         Theme::ThemeImage* outer = getImage("outer", _state);
         Theme::ThemeImage* outer = getImage("outer", _state);