fix option menu hover update stuff when scrolling is happening
This commit is contained in:
parent
6413392f1e
commit
65f95696eb
|
@ -606,7 +606,9 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
int mouseY = displayContainer.mouseY;
|
int mouseY = displayContainer.mouseY;
|
||||||
int delta = displayContainer.renderDelta;
|
int delta = displayContainer.renderDelta;
|
||||||
|
|
||||||
|
int prevscrollpos = scrollHandler.getIntPosition();
|
||||||
scrollHandler.update(delta);
|
scrollHandler.update(delta);
|
||||||
|
boolean scrollPositionChanged = prevscrollpos != scrollHandler.getIntPosition();
|
||||||
|
|
||||||
if (openDropdownMenu == null) {
|
if (openDropdownMenu == null) {
|
||||||
for (DropdownMenu<Object> menu : visibleDropdownMenus) {
|
for (DropdownMenu<Object> menu : visibleDropdownMenus) {
|
||||||
|
@ -634,7 +636,7 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
navHoverTime -= delta;
|
navHoverTime -= delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mouseX - prevMouseX == 0 && mouseY - prevMouseY == 0) {
|
if (!scrollPositionChanged && (mouseX - prevMouseX == 0 && mouseY - prevMouseY == 0)) {
|
||||||
updateIndicatorAlpha();
|
updateIndicatorAlpha();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -855,7 +857,6 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
if (!isAdjustingSlider) {
|
if (!isAdjustingSlider) {
|
||||||
scrollHandler.scrollOffset(-delta);
|
scrollHandler.scrollOffset(-delta);
|
||||||
}
|
}
|
||||||
updateHoverOption(prevMouseX, prevMouseY);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user