X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=f43a8c6459dcd52dc57c82c486f2d553ed8f6057;hb=12f13d35beee55d8514aaccd6d8a8fdaffc67fe4;hp=c6e5339a15d0f562e9eaf555373a7e2fb56d40d9;hpb=8cd33b294accd2d91e74720607bc8d7402ac2d6c;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index c6e5339..f43a8c6 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -38,6 +38,7 @@ var gMenuSmallFont: DWORD; PromptIP: string; PromptPort: Word; + TempScale: Integer = -1; implementation @@ -161,7 +162,11 @@ begin gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0; gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex; gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex = 0; - g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1; + if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then + begin + TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value; + g_dbg_scale := TempScale + 1; + end; menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu')); @@ -369,7 +374,7 @@ begin if g_Game_IsClient then MC_SEND_PlayerSettings; g_Options_Write(GameDir+'/'+CONFIG_FILENAME); - g_Console_WriteConfig(GameDir + '/dfconfig.cfg'); + g_Console_WriteGameConfig(); end; procedure ReadOptions(); @@ -567,7 +572,8 @@ begin with TGUISwitch(menu.GetControl('swPlayerIndicator')) do if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1; - TGUIScroll(menu.GetControl('scScaleFactor')).Value := Round(g_dbg_scale - 1); + TempScale := Round(g_dbg_scale - 1); + TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale; menu := TGUIMenu(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mOptionsPlayersP1Menu')); @@ -1339,7 +1345,11 @@ var menu: TGUIMenu; begin menu := TGUIMenu(g_GUI_GetWindow('OptionsGameMenu').GetControl('mOptionsGameMenu')); - g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1; + if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then + begin + TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value; + g_dbg_scale := TempScale + 1; + end; end; procedure ProcChangeTouchSettings(Sender: TGUIControl);