draggingPointer = pointer;\r
return true;\r
}\r
- setScrollX(amountX + getPageScrollX() * (x < hKnobBounds.x ? -1 : 1));\r
+ setScrollX(amountX + areaWidth * (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 + getPageScrollY() * (y < vKnobBounds.y ? 1 : -1));\r
+ setScrollY(amountY + areaHeight * (y < vKnobBounds.y ? 1 : -1));\r
return true;\r
}\r
return false;\r
public boolean scrolled (InputEvent event, float x, float y, int amount) {\r
resetFade();\r
if (scrollY)\r
- setScrollY(amountY + Math.max(areaHeight * 0.9f, maxY * 0.1f) / 4 * amount);\r
+ setScrollY(amountY + getMouseWheelY() * amount);\r
else if (scrollX) //\r
- setScrollX(amountX + Math.max(areaWidth * 0.9f, maxX * 0.1f) / 4 * amount);\r
+ setScrollX(amountX + getMouseWheelX() * amount);\r
return true;\r
}\r
});\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
+ /** Returns the amount to scroll horizontally when the mouse wheel is scrolled. */\r
+ protected float getMouseWheelX () {\r
+ return Math.max(areaWidth * 0.9f, maxX * 0.1f) / 4;\r
}\r
\r
- /** Returns the amount to scroll vertically when the scrollbar is clicked. */\r
- protected float getPageScrollY () {\r
- return areaHeight;\r
+ /** Returns the amount to scroll vertically when the mouse wheel is scrolled. */\r
+ protected float getMouseWheelY () {\r
+ return Math.max(areaHeight * 0.9f, maxY * 0.1f) / 4;\r
}\r
\r
public void setScrollX (float pixels) {\r