int wheelMovement = Mouse.getEventDWheel();
if (wheelMovement != 0) {
for (int i = elements.size(); i-- > 0; ) {
ElementBase c = elements.get(i);
if (!c.isVisible() || !c.isEnabled() || !c.intersectsWith(mouseX, mouseY)) {
continue;
}
if (c.onMouseWheel(mouseX, mouseY, wheelMovement)) {
return;
}