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 năm trước cách đây
mục cha
commit
32416963e2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)
-            _region = _bounds;
+            _region = _viewportClipBounds;
 
         // Draw the outer image.
         Theme::ThemeImage* outer = getImage("outer", _state);