List of usage examples for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setScrollPercentX
public void setScrollPercentX(float percentX)
From source file:com.kotcrab.vis.ui.widget.ScrollableTextArea.java
License:Apache License
private void updateScrollPosition() { if (cullingArea == null || getParent() instanceof ScrollPane == false) return;//w w w . j a v a 2 s . co m ScrollPane scrollPane = (ScrollPane) getParent(); if (cullingArea.contains(getCursorX(), cullingArea.y) == false) { scrollPane.setScrollPercentX(getCursorX() / getWidth()); } if (cullingArea.contains(cullingArea.x, (getHeight() - getCursorY())) == false) { scrollPane.setScrollPercentY(getCursorY() / getHeight()); } }