draggingPointer = pointer;\r
return true;\r
}\r
- setScrollX(amountX + areaWidth * (x < hKnobBounds.x ? -1 : 1));\r
+ setScrollX(amountX + getPageScrollX() * (x < hKnobBounds.x ? -1 : 1));\r
return true;\r
}\r
if (scrollY && vScrollBounds.contains(x, y)) {\r
draggingPointer = pointer;\r
return true;\r
}\r
- setScrollY(amountY + areaHeight * (y < vKnobBounds.y ? 1 : -1));\r
+ setScrollY(amountY + getPageScrollY() * (y < vKnobBounds.y ? 1 : -1));\r
return true;\r
}\r
return false;\r
this.visualAmountY = pixelsY;\r
}\r
\r
+ /** Returns the amount to scroll horizontally when the scrollbar is clicked. */\r
+ protected float getPageScrollX () {\r
+ return areaWidth;\r
+ }\r
+\r
+ /** Returns the amount to scroll vertically when the scrollbar is clicked. */\r
+ protected float getPageScrollY () {\r
+ return areaHeight;\r
+ }\r
+\r
public void setScrollX (float pixels) {\r
scrollX(MathUtils.clamp(pixels, 0, maxX));\r
}\r