scroll by moving mouse

This commit is contained in:
yugecin 2016-12-11 02:23:02 +01:00
parent 7225095472
commit 0a54d63877

View File

@ -262,6 +262,7 @@ public class OptionsOverlay {
}
public void mouseDragged(int oldx, int oldy, int newx, int newy) {
scrollOffset += oldy - newy;
}
public void mouseWheelMoved(int delta) {
@ -277,6 +278,10 @@ public class OptionsOverlay {
}
private void updateHoverOption(int mouseX, int mouseY) {
if (selectedOption != null) {
hoverOption = selectedOption;
return;
}
hoverOption = null;
if (mouseY < optionStartY || mouseX < optionStartX || mouseX > optionStartX + optionWidth) {
return;