diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 60750aa8aa5b133a4f4441624e7f5821f63deaad..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();
procedure ProcSwitchMonstersCustom(Sender: TGUIControl);
begin
- // don't turn off monsters in DM
+ // don't turn off monsters in DM
+ {
with TGUIMenu(g_ActiveWindow.GetControl('mCustomGameMenu')) do
if TGUISwitch(GetControl('swGameMode')).GetText <> _lc[I_MENU_GAME_TYPE_CTF] then
TGUISwitch(GetControl('swMonsters')).ItemIndex := 0
else
TGUISwitch(GetControl('swMonsters')).ItemIndex := 1;
+ }
{
if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then
TGUISwitch(GetControl('swMonsters')).ItemIndex := 0
procedure ProcSwitchMonstersNet(Sender: TGUIControl);
begin
// don't turn off monsters in DM
+ {
with TGUIMenu(g_ActiveWindow.GetControl('mNetServerMenu')) do
if TGUISwitch(GetControl('swGameMode')).GetText <> _lc[I_MENU_GAME_TYPE_CTF] then
TGUISwitch(GetControl('swMonsters')).ItemIndex := 0
else
TGUISwitch(GetControl('swMonsters')).ItemIndex := 1;
+ }
{
if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then
TGUISwitch(GetControl('swMonsters')).ItemIndex := 0
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');