diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 57f12e98a45349501ccb52fd666817503eae7731..2a444ead437b2e2e6cad6313405e344d309ed38d 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
e_graphics, e_input, g_game, g_console, g_gui,
e_sound, g_options, g_sound, g_player,
g_weapons, SysUtils, g_triggers, MAPDEF, g_map,
- g_menu, g_language, g_net,
- utils, conbuf, envvars;
+ g_menu, g_language, g_net, g_holmes,
+ utils, conbuf, envvars, fui_wadread, fui_style,
+ fui_gfx_gl, xparser;
var
SDL_StartTextInput();
{$ENDIF}
+{$IFNDEF HEADLESS}
+ if not fuiAddWad('flexui.wad') then
+ begin
+ if not fuiAddWad('./data/flexui.wad') then fuiAddWad('./flexui.wad');
+ end;
+ g_holmes_imfunctional := true;
+ try
+ e_LogWriteln('FlexUI: loading stylesheet...');
+ uiLoadStyles('flexui/widgets.wgs');
+ except on e: TParserException do
+ begin
+ writeln('ERROR at (', e.tokLine, ',', e.tokCol, '): ', e.message);
+ //raise;
+ end;
+ else
+ begin
+ //raise;
+ end;
+ end;
+ try
+ fuiGfxLoadFont('win8', 'flexui/fonts/win8.fuifont');
+ fuiGfxLoadFont('win14', 'flexui/fonts/win14.fuifont');
+ fuiGfxLoadFont('win16', 'flexui/fonts/win16.fuifont');
+ g_holmes_imfunctional := false;
+ except on e: Exception do
+ begin
+ writeln('ERROR loading FlexUI fonts');
+ //raise;
+ end;
+ else
+ begin
+ //raise;
+ end;
+ end;
+{$ENDIF}
+
e_WriteLog('Entering SDLMain', TMsgType.Notify);
{$WARNINGS OFF}
SDLMain();
{$WARNINGS ON}
-{$IFDEF HEADLESS}
+{$IFNDEF HEADLESS}
SDL_StopTextInput();
{$ENDIF}