don't reshow the options overlay if it's already shown

This commit is contained in:
yugecin 2018-07-08 11:03:02 +02:00
parent 50cd209b67
commit 04646f7d2a
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44
2 changed files with 8 additions and 4 deletions

View File

@ -811,8 +811,10 @@ public class MainMenu extends BaseOpsuState {
} }
if (this.buttonPositions[1].contains(x, y, 0.25f)) { if (this.buttonPositions[1].contains(x, y, 0.25f)) {
SoundController.playSound(SoundEffect.MENUHIT); if (!optionsOverlay.isActive()) {
optionsOverlay.show(); SoundController.playSound(SoundEffect.MENUHIT);
optionsOverlay.show();
}
return true; return true;
} }

View File

@ -928,8 +928,10 @@ public class SongMenu extends ComplexOpsuState {
this.keyPressed(KEY_F3, '\0'); this.keyPressed(KEY_F3, '\0');
return true; return true;
} else if (selectOptionsButton.contains(x, y)) { } else if (selectOptionsButton.contains(x, y)) {
SoundController.playSound(SoundEffect.MENUHIT); if (!optionsOverlay.isActive()) {
optionsOverlay.show(); SoundController.playSound(SoundEffect.MENUHIT);
optionsOverlay.show();
}
return true; return true;
} }