OSDN Git Service

(no commit message)
authornathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 25 Oct 2011 01:34:35 +0000 (01:34 +0000)
committernathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 25 Oct 2011 01:34:35 +0000 (01:34 +0000)
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/FlickScrollPane.java

index 677b6d0..5426a39 100644 (file)
@@ -42,7 +42,7 @@ public class FlickScrollPane extends WidgetGroup {
 \r
        protected boolean scrollX, scrollY;\r
        protected float amountX, amountY;\r
-       protected float maxX, maxY;\r
+       public float maxX, maxY;\r
        protected float velocityX, velocityY;\r
        protected float flingTimer;\r
 \r
@@ -282,6 +282,14 @@ public class FlickScrollPane extends WidgetGroup {
                return amountY;\r
        }\r
 \r
+       public float getScrollPercentX () {\r
+               return amountX / maxX;\r
+       }\r
+\r
+       public float getScrollPercentY () {\r
+               return amountY / maxY;\r
+       }\r
+\r
        /** Sets the {@link Actor} embedded in this scroll pane.\r
         * @param widget the Actor */\r
        public void setWidget (Actor widget) {\r