view states are now managed by a stack + bugfixing

- when one defines DECL_ENUM_LAST it is possible to check whether a string for
	a give enum exists
- making sure ships are alive when they are spawned
- added warning concerning QueueEvent and TriggerEvent (one shall avoid the
	latter)
This commit is contained in:
2010-11-27 20:56:38 +01:00
parent f8e5b7e873
commit 3340471c61
15 changed files with 114 additions and 55 deletions
+13 -8
View File
@@ -523,17 +523,22 @@ void View::DrawUiGamePaused() {
if (Engine::GUI::Button (1, "Resume Game", screen_right * 0.5 - 100, 200, button_width, button_height)) {
PopViewState();
}
if (Engine::GUI::Button (2, "Abort Game", screen_right * 0.5 - 100, 250, button_width, button_height)) {
while (mViewStateStack.size())
PopViewState();
PushViewState(ViewStateGameRunning);
GetModel()->SetGameState(GameStateRunning);
}
if (Engine::GUI::Button (3, "Quit", screen_right * 0.5 - 100, 330, button_width, button_height)) {
if (Engine::GUI::Button (2, "Options", screen_right * 0.5 - 100, 250, button_width, button_height)) {
PushViewState (ViewStateOptions);
}
if (Engine::GUI::Button (3, "Abort Game", screen_right * 0.5 - 100, 300, button_width, button_height)) {
while (mViewStateStack.size())
PopViewState();
PushViewState(ViewStateMainMenu);
GetModel()->SetGameState(GameStatePaused);
}
if (Engine::GUI::Button (4, "Quit", screen_right * 0.5 - 100, 380, button_width, button_height)) {
Engine::RunCommand("quit");
}
}