setOverscroll(false, false);
setFadeScrollBars(false);
list = new List(style.listStyle);
setWidget(list);
list.addListener(new InputListener() {
public boolean mouseMoved (InputEvent event, float x, float y) {
list.setSelectedIndex(Math.min(items.size - 1, (int)((list.getHeight() - y) / list.getItemHeight())));
return true;
}
});
addListener(new InputListener() {
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
if (event.getTarget() == list) return true;
setSelected(selected); // Revert.
hideList();
return false;