summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c0e145)
raw | patch | inline | side by side (parent: 5c0e145)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 2 Sep 2017 18:59:15 +0000 (21:59 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 2 Sep 2017 19:36:15 +0000 (22:36 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 2d1c41a7c17db93ea5e910d6c87bd8456fa31422..9ec96396134f776058e72cb7616103bd7a116501 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
else e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0);
end;
// F3 at menu will show game loading dialog
- if e_KeyPressed(IK_F3) then g_Menu_Show_LoadMenu();
+ if e_KeyPressed(IK_F3) then g_Menu_Show_LoadMenu(true);
if (g_ActiveWindow <> nil) then
begin
//e_DrawFillQuad(0, 0, gScreenWidth-1, gScreenHeight-1, 48, 48, 48, 180);
// F3 at titlepic will show game loading dialog
if e_KeyPressed(IK_F3) then
begin
- g_Menu_Show_LoadMenu();
+ g_Menu_Show_LoadMenu(true);
if (g_ActiveWindow <> nil) then e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
end;
end;
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 85334b3bf14b8331ed5c2bc114266c667a0db93f..93666fa87f3f4f4a9da3c5fe71a195b871af8533 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
procedure g_Menu_AskLanguage();
procedure g_Menu_Show_SaveMenu();
-procedure g_Menu_Show_LoadMenu();
+procedure g_Menu_Show_LoadMenu(standalone: Boolean=false);
procedure g_Menu_Show_GameSetGame();
procedure g_Menu_Show_OptionsVideo();
procedure g_Menu_Show_OptionsSound();
g_Sound_PlayEx('MENU_OPEN');
end;
-procedure g_Menu_Show_LoadMenu();
+procedure g_Menu_Show_LoadMenu (standalone: Boolean=false);
begin
+ if (g_ActiveWindow <> nil) and (g_ActiveWindow.name = 'LoadMenu') then exit; // nothing to do
if gGameSettings.GameType = GT_SINGLE then
- g_GUI_ShowWindow('GameSingleMenu')
+ begin
+ if not standalone then g_GUI_ShowWindow('GameSingleMenu')
+ end
else
begin
- if g_Game_IsClient then
- Exit
- else
- if g_Game_IsNet then
- Exit
- else
- g_GUI_ShowWindow('GameCustomMenu');
+ if g_Game_IsClient then exit;
+ if g_Game_IsNet then exit;
+ if not standalone then g_GUI_ShowWindow('GameCustomMenu');
end;
g_GUI_ShowWindow('LoadMenu');
g_Sound_PlayEx('MENU_OPEN');