option menu: exit updateHoverOption() early when mouse is in navigation bar
This commit is contained in:
parent
a031af5d05
commit
d11656daf6
|
@ -925,8 +925,7 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
// active section is the one that is visible in the top half of the screen
|
// active section is the one that is visible in the top half of the screen
|
||||||
activeSection = sections[0];
|
activeSection = sections[0];
|
||||||
int virtualY = optionStartY;
|
int virtualY = optionStartY;
|
||||||
for (int sectionIndex = 0; sectionIndex < sections.length; sectionIndex++) {
|
for (OptionTab section : sections) {
|
||||||
OptionTab section = sections[sectionIndex];
|
|
||||||
if (section.filtered) {
|
if (section.filtered) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -949,6 +948,10 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateHoverOption(int mouseX, int mouseY) {
|
private void updateHoverOption(int mouseX, int mouseY) {
|
||||||
|
if (mouseX < navWidth) {
|
||||||
|
hoverOption = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (openDropdownMenu != null || keyEntryLeft || keyEntryRight) {
|
if (openDropdownMenu != null || keyEntryLeft || keyEntryRight) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -977,7 +980,7 @@ public class OptionsOverlay extends OverlayOpsuState {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (mouseVirtualY <= optionHeight) {
|
if (mouseVirtualY <= optionHeight) {
|
||||||
if (mouseX > navWidth && mouseVirtualY >= 0) {
|
if (mouseVirtualY >= 0) {
|
||||||
int indicatorPos = scrollHandler.getIntPosition() + mouseY - mouseVirtualY;
|
int indicatorPos = scrollHandler.getIntPosition() + mouseY - mouseVirtualY;
|
||||||
if (indicatorPos != this.indicatorPos + indicatorOffsetToNextPos) {
|
if (indicatorPos != this.indicatorPos + indicatorOffsetToNextPos) {
|
||||||
this.indicatorPos += indicatorOffsetToNextPos; // finish the current moving animation
|
this.indicatorPos += indicatorOffsetToNextPos; // finish the current moving animation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user