From 45ae72b763268d87a5a6613231b7a11a2fbd8168 Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Thu, 24 May 2018 22:08:56 -0400 Subject: STARTREK: DEMON1 done (klingon attack) --- engines/startrek/menu.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'engines/startrek/menu.cpp') diff --git a/engines/startrek/menu.cpp b/engines/startrek/menu.cpp index b0aea1f284..d6929d0d5c 100644 --- a/engines/startrek/menu.cpp +++ b/engines/startrek/menu.cpp @@ -848,6 +848,39 @@ void StarTrekEngine::showQuitGamePrompt(int x, int y) { } } +void StarTrekEngine::showGameOverMenu() { + const char *options[] = { + "Game Over", + "#GENE\\GENER006#Load a previously saved game.", + "#GENE\\GENER020#Restart the game.", + "#GENE\\GENER018#Quit the game.", + "" + }; + + while (true) { + _inQuitGameMenu = true; + int selected = showText(&StarTrekEngine::readTextFromArray, (uintptr)options, 20, 20, TEXTCOLOR_YELLOW, true, false, true); + _inQuitGameMenu = false; + + switch (selected) { + case 0: // Load game + _gfx->fadeoutScreen(); + showLoadMenu(); // TODO: this probably manipulates the stack to jump out of this function... + break; + case 1: // Restart + _gfx->fadeoutScreen(); + // TODO + break; + case 2: // Quit + _gfx->fadeoutScreen(); + _system->quit(); + break; + default: + break; + } + } +} + /** * This can be called from startup or from the options menu. * On startup, this tries to load the setting without user input. -- cgit v1.2.3