OSDN Git Service

ScrollPane, fixed hit() logic.
authorNathanSweet <nathan.sweet@gmail.com>
Tue, 21 Aug 2012 04:12:30 +0000 (21:12 -0700)
committerNathanSweet <nathan.sweet@gmail.com>
Tue, 21 Aug 2012 04:12:30 +0000 (21:12 -0700)
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/ScrollPane.java

index 32d2d3c..39833bd 100644 (file)
@@ -548,7 +548,7 @@ public class ScrollPane extends WidgetGroup {
        }\r
 \r
        public Actor hit (float x, float y) {\r
-               if (x < 0 && x >= getWidth() && y < 0 && y >= getHeight()) return null;\r
+               if (x < 0 || x >= getWidth() || y < 0 || y >= getHeight()) return null;\r
                if (scrollX && hScrollBounds.contains(x, y)) return this;\r
                if (scrollY && vScrollBounds.contains(x, y)) return this;\r
                return super.hit(x, y);\r