diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index 1db0c639efbfe27713abca1491ad2723fc4de1d5..d20f32cc00e86ad555bb38a2a33735baf4f1d067 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
g_console, e_input, g_options, g_game,
g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net,
g_map, g_gfx, g_monsters, g_holmes, xprofiler,
- sdlcarcass, gh_ui;
+ sdlcarcass, fui_ctls;
const
key := ev.key.keysym.scancode;
down := (ev.type_ = SDL_KEYDOWN);
{$IF not DEFINED(HEADLESS)}
- if evSDLCB(ev) then
+ if fuiOnSDLEvent(ev) then
begin
// event eaten, but...
if not down then e_KeyUpDown(key, false);
{$IF not DEFINED(HEADLESS)}
SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, SDL_MOUSEWHEEL, SDL_MOUSEMOTION:
- evSDLCB(ev);
+ fuiOnSDLEvent(ev);
{$ENDIF}
SDL_TEXTINPUT:
{$ENDIF}
arg: AnsiString;
mdfo: TStream;
+ itmp: Integer;
+ valres: Word;
begin
{$IFDEF HEADLESS}
e_NoGraphics := true;
{.$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
begin
- if not conParseFloat(gh_ui_scale, ParamStr(idx)) then gh_ui_scale := 1.0;
+ if not conParseFloat(fuiRenderScale, ParamStr(idx)) then fuiRenderScale := 1.0;
+ Inc(idx);
+ 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;