add the showcondition to sboverlay options
This commit is contained in:
parent
e916e73ddb
commit
7459dd66d0
|
@ -36,6 +36,7 @@ public class OptionsOverlay {
|
|||
|
||||
private static Options.GameOption[] options = new Options.GameOption[] {
|
||||
Options.GameOption.DANCE_MOVER,
|
||||
Options.GameOption.DANCE_QUAD_BEZ_AGGRESSIVENESS,
|
||||
Options.GameOption.DANCE_MOVER_DIRECTION,
|
||||
Options.GameOption.DANCE_SLIDER_MOVER_TYPE,
|
||||
Options.GameOption.DANCE_SPINNER,
|
||||
|
@ -99,8 +100,12 @@ public class OptionsOverlay {
|
|||
g.setColor(Color.black);
|
||||
g.fillRect(0, 0, width, height);
|
||||
Color.black.a = a;
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
drawOption(g, options[i], i, selectedOption == null ? hoverIdx == i : selectedOption == options[i]);
|
||||
for (int i = 0, j = 0; i < options.length; i++) {
|
||||
if (!options[i].showCondition()) {
|
||||
continue;
|
||||
}
|
||||
j++;
|
||||
drawOption(g, options[j], j, selectedOption == null ? hoverIdx == j : selectedOption == options[j]);
|
||||
}
|
||||
if (list.isVisible()) {
|
||||
list.render(container, game, g);
|
||||
|
@ -123,6 +128,14 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user