mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 20:22:31 +01:00
- return to previous menu when tutorials / scenarios are empty
This commit is contained in:
parent
a8af70cee1
commit
51d56926cc
@ -172,17 +172,22 @@ void MenuStateScenario::mouseClick(int x, int y, MouseButton mouseButton) {
|
||||
|
||||
if(mainMessageBox.getEnabled()){
|
||||
int button= 0;
|
||||
if(mainMessageBox.mouseClick(x, y, button))
|
||||
{
|
||||
if(mainMessageBox.mouseClick(x, y, button)) {
|
||||
soundRenderer.playFx(coreData.getClickSoundA());
|
||||
if(button==0) {
|
||||
mainMessageBox.setEnabled(false);
|
||||
|
||||
if(scenarioFiles.empty() == true && mainMessageBoxState ==1) {
|
||||
mainMenu->setState(new MenuStateNewGame(program, mainMenu));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(buttonReturn.mouseClick(x,y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundA());
|
||||
mainMenu->setState(new MenuStateNewGame(program, mainMenu));
|
||||
return;
|
||||
}
|
||||
else if(buttonPlayNow.mouseClick(x,y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundC());
|
||||
|
Loading…
x
Reference in New Issue
Block a user