diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 05e32bf9d016ca27fca3883e4c2569a6f26d00d6..fca66beba93f4e99812a0570f864adb2b66ff58a 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
-(* Copyright (C) DooM 2D:Forever Developers
+(* Copyright (C) Doom 2D: Forever Developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
implementation
uses
+{$IFDEF USE_NANOGL}
+ nanoGL,
+{$ELSE}
+ GL, GLExt,
+{$ENDIF}
g_gui, g_textures, e_graphics, g_main, g_window, g_game, g_map,
g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
- e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
- MAPDEF, wadreader, Math, g_saveload,
- e_texture, GL, GLExt, g_language,
+ e_log, SysUtils, CONFIG, g_playermodel, DateUtils, sdl2,
+ MAPDEF, Math, g_saveload,
+ e_texture, g_language,
g_net, g_netmsg, g_netmaster, g_items, e_input,
- utils;
+ utils, wadreader;
type TYNCallback = procedure (yes:Boolean);
var
menu: TGUIMenu;
i: Integer;
+ ovs: Boolean;
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu'));
gBPP := 16
else
gBPP := 32;
+
+ ovs := gVSync;
gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0;
+ if (ovs <> gVSync) then g_SetVSync(gVSync);
+
gTextureFilter := TGUISwitch(menu.GetControl('swTextureFilter')).ItemIndex = 0;
glLegacyNPOT := not (TGUISwitch(menu.GetControl('swLegacyNPOT')).ItemIndex = 0);
gMuteWhenInactive := TGUISwitch(menu.GetControl('swInactiveSounds')).ItemIndex = 1;
gAnnouncer := TGUISwitch(menu.GetControl('swAnnouncer')).ItemIndex;
gSoundEffectsDF := TGUISwitch(menu.GetControl('swSoundEffects')).ItemIndex = 1;
+ gUseChatSounds := TGUISwitch(menu.GetControl('swChatSpeech')).ItemIndex = 0;
menu := TGUIMenu(g_GUI_GetWindow('OptionsGameMenu').GetControl('mOptionsGameMenu'));
else
ItemIndex := 0;
+ with TGUISwitch(menu.GetControl('swChatSpeech')) do
+ if gUseChatSounds then
+ ItemIndex := 0
+ else
+ ItemIndex := 1;
+
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1Menu').GetControl('mOptionsControlsP1Menu'));
with menu, gGameControls.P1Control do
begin
procedure ProcSelectWAD(Sender: TGUIControl);
var
wad: String;
- list: SArray;
+ list: SSArray;
begin
with TGUIMenu(g_GUI_GetWindow('SelectMapMenu').GetControl('mSelectMapMenu')) do
begin
procedure ProcVideoOptionsRes();
var
menu: TGUIMenu;
- list: SArray;
+ list: SSArray;
SR: DWORD;
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoResMenu').GetControl('mOptionsVideoResMenu'));
Menu: TGUIWindow;
//SR: TSearchRec;
a, cx, _y, i: Integer;
- //list: SArray;
+ //list: SSArray;
begin
Menu := TGUIWindow.Create('MainMenu');
with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
AddItem(_lc[I_MENU_COMPAT_DOOM2]);
AddItem(_lc[I_MENU_COMPAT_DF]);
end;
+ // Ïåðåêëþ÷àòåëü çâóêîâ ÷àòà
+ with AddSwitch (_lc[I_MENU_SOUND_CHAT]) do
+ begin;
+ Name := 'swChatSpeech';
+ AddItem(_lc[I_MENU_YES]);
+ AddItem(_lc[I_MENU_NO]);
+ end;
with AddSwitch(_lc[I_MENU_SOUND_INACTIVE_SOUNDS]) do
begin
Name := 'swInactiveSounds';