From 015a25e0eecbc51ad0d15ff3194218a7fd8a55e0 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Tue, 3 Oct 2017 23:23:45 +0300 Subject: [PATCH] it is now possible to use "--holmes-font <8|14|16>" cli arg to select Holmes UI font --- src/game/g_window.pas | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 258b489..d20f32c 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -767,6 +767,8 @@ var {$ENDIF} arg: AnsiString; mdfo: TStream; + itmp: Integer; + valres: Word; begin {$IFDEF HEADLESS} e_NoGraphics := true; @@ -799,6 +801,7 @@ begin {.$ENDIF} if arg = '--holmes' then begin g_holmes_enabled := true; g_Game_SetDebugMode(); end; + if (arg = '--holmes-ui-scale') or (arg = '-holmes-ui-scale') then begin if (idx <= ParamCount) then @@ -808,6 +811,24 @@ begin end; end; + if (arg = '--holmes-font') or (arg = '-holmes-font') then + begin + if (idx <= ParamCount) then + begin + itmp := 0; + val(ParamStr(idx), itmp, valres); + if (valres = 0) then + begin + case itmp of + 8: uiContext.font := 'win8'; + 14: uiContext.font := 'win14'; + 16: uiContext.font := 'win16'; + end; + end; + Inc(idx); + end; + end; + if (arg = '--game-scale') or (arg = '-game-scale') then begin if (idx <= ParamCount) then -- 2.29.2