X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=9e89ad9df259586e4380fecb228e99c8bb081a5e;hp=04ffd90df4089a2ff64649478ad1ba764fbfebbc;hb=86d45dd42fd3cf9c183883e4ab1abe5b607e1779;hpb=ad07d68e5caa4042bf2769099460d37c528e246c diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 04ffd90..9e89ad9 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -170,6 +170,8 @@ begin TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value; g_dbg_scale := TempScale + 1; end; + gWeaponAutoswitch := TGUISwitch(menu.GetControl('swWeaponAutoswitch')).ItemIndex = 0; + menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu')); @@ -595,6 +597,9 @@ begin TempScale := Round(g_dbg_scale - 1); TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale; + with TGUISwitch(menu.GetControl('swWeaponAutoswitch')) do + if gWeaponAutoswitch then ItemIndex := 0 else ItemIndex := 1; + menu := TGUIMenu(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mOptionsPlayersP1Menu')); TGUIListBox(menu.GetControl('lsP1Model')).SelectItem(gPlayer1Settings.Model); @@ -2990,6 +2995,12 @@ begin Max := 10; OnChange := ProcChangeGameSettings; end; + with AddSwitch(_lc[I_MENU_GAME_WEAPON_AUTOSWITCH]) do + begin + Name := 'swWeaponAutoswitch'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + end; ReAlign(); end; Menu.DefControl := 'mOptionsGameMenu';