summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bbbeedf)
raw | patch | inline | side by side (parent: bbbeedf)
author | Stas'M <x86corez@gmail.com> | |
Fri, 26 Jul 2019 16:44:43 +0000 (19:44 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Fri, 26 Jul 2019 16:44:43 +0000 (19:44 +0300) |
src/game/g_menu.pas | patch | blob | history |
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index ba91ca3b28500d9f5a19ae442515c8bbe899eb1b..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'));
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);