X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_main.pas;h=7de78252194aea44adfb3baf70463f403f5ede8b;hb=4d5a94c228a43cdd0333979f3aa218c56c248188;hp=734ae36ff49f1d76f11d66d7930c63d7c81c5908;hpb=5368f6638623f763633157cdd4920bf2cb66fce5;p=d2df-sdl.git diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 734ae36..7de7825 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -43,7 +43,7 @@ uses g_weapons, SysUtils, g_triggers, MAPDEF, g_map, g_menu, g_language, g_net, g_holmes, utils, conbuf, envvars, fui_wadread, fui_style, - xparser; + fui_gfx_gl, xparser; var @@ -109,7 +109,6 @@ begin try e_LogWriteln('FlexUI: loading stylesheet...'); uiLoadStyles('flexui/widgets.wgs'); - g_holmes_imfunctional := false; except on e: TParserException do begin writeln('ERROR at (', e.tokLine, ',', e.tokCol, '): ', e.message); @@ -120,6 +119,21 @@ 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); @@ -471,6 +485,7 @@ begin Msg.Msg := WM_KEYDOWN; Msg.WParam := IK_ESCAPE; g_ActiveWindow.OnMessage(Msg); + if (not g_Game_IsNet) and (g_ActiveWindow = nil) then g_Game_Pause(false); //Fn loves to do this end else if (gState <> STATE_FOLD) then begin @@ -500,7 +515,7 @@ begin begin // .. � if gGameOn and (not gConsoleShow) and (not gChatShow) then begin - while g_ActiveWindow <> nil do g_GUI_HideWindow(False); + while (g_ActiveWindow <> nil) do g_GUI_HideWindow(False); if (not g_Game_IsNet) then g_Game_Pause(True); case K of IK_F2: g_Menu_Show_SaveMenu();