scroll by moving mouse
This commit is contained in:
parent
7225095472
commit
0a54d63877
|
@ -262,6 +262,7 @@ public class OptionsOverlay {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseDragged(int oldx, int oldy, int newx, int newy) {
|
public void mouseDragged(int oldx, int oldy, int newx, int newy) {
|
||||||
|
scrollOffset += oldy - newy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseWheelMoved(int delta) {
|
public void mouseWheelMoved(int delta) {
|
||||||
|
@ -277,6 +278,10 @@ public class OptionsOverlay {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateHoverOption(int mouseX, int mouseY) {
|
private void updateHoverOption(int mouseX, int mouseY) {
|
||||||
|
if (selectedOption != null) {
|
||||||
|
hoverOption = selectedOption;
|
||||||
|
return;
|
||||||
|
}
|
||||||
hoverOption = null;
|
hoverOption = null;
|
||||||
if (mouseY < optionStartY || mouseX < optionStartX || mouseX > optionStartX + optionWidth) {
|
if (mouseY < optionStartY || mouseX < optionStartX || mouseX > optionStartX + optionWidth) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user