diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index c6e5339a15d0f562e9eaf555373a7e2fb56d40d9..f43a8c6459dcd52dc57c82c486f2d553ed8f6057 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
gMenuSmallFont: DWORD;
PromptIP: string;
PromptPort: Word;
+ TempScale: Integer = -1;
implementation
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'));
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();
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'));
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);