X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=93666fa87f3f4f4a9da3c5fe71a195b871af8533;hb=1a0deddcb78946c8f7eba838d00fec5d6192501f;hp=60750aa8aa5b133a4f4441624e7f5821f63deaad;hpb=ccffc8481521ff8cbeb57c76c0387c10d806182e;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 60750aa..93666fa 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -26,7 +26,7 @@ procedure LoadFont(txtres, fntres: string; var FontID: DWORD); 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(); @@ -506,12 +506,14 @@ end; 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 @@ -523,11 +525,13 @@ end; 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 @@ -3084,19 +3088,18 @@ begin 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');