fix menu hiding items cause derpings in detecting current hovering option
This commit is contained in:
@@ -130,15 +130,15 @@ public class OptionsOverlay {
|
||||
if (index >= options.length) {
|
||||
return -1;
|
||||
}
|
||||
int i = index;
|
||||
while (i >= 0) {
|
||||
if (!options[i--].showCondition()) {
|
||||
if (++index >= options.length) {
|
||||
return -1;
|
||||
}
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
if (options[i].showCondition()) {
|
||||
index--;
|
||||
}
|
||||
if (index < 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void update(int mouseX, int mouseY) {
|
||||
|
||||
Reference in New Issue
Block a user