[Fix] Ensure the game will pause when opening the pilot information window.

This commit is contained in:
Allanis 2013-02-24 17:58:48 +00:00
parent efe9970854
commit ff217f68d6

View File

@ -35,6 +35,7 @@ static void info_menu_close(char* str);
// Small ingame menu. // Small ingame menu.
void menu_small(void) { void menu_small(void) {
if(menu_isOpen(MENU_SMALL)) return; // It's already open.. if(menu_isOpen(MENU_SMALL)) return; // It's already open..
pause();
unsigned int wid; unsigned int wid;
@ -49,7 +50,6 @@ void menu_small(void) {
BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_WIDTH, BUTTON_HEIGHT,
"btnResume", "Resume", menu_small_close); "btnResume", "Resume", menu_small_close);
pause();
menu_Open(MENU_SMALL); menu_Open(MENU_SMALL);
} }
@ -76,6 +76,7 @@ static void exit_game(void) {
// Info menu. // Info menu.
void info_menu(void) { void info_menu(void) {
if(menu_isOpen(MENU_INFO)) return; if(menu_isOpen(MENU_INFO)) return;
pause();
char str[128];; char str[128];;
unsigned int wid; unsigned int wid;
@ -121,5 +122,6 @@ static void info_menu_close(char* str) {
window_destroy(window_get("Info")); window_destroy(window_get("Info"));
menu_Close(MENU_INFO); menu_Close(MENU_INFO);
unpause();
} }