DEADSOFTWARE

Holmes now require "data/flexui.wad" (it is not fatal to not have this file; Holmes...
[d2df-sdl.git] / src / game / g_window.pas
index 12a038f68950f620a4c804e6d7d7078b65b60946..258b489b1f8f35f335061f207515c48406bab2b0 100644 (file)
@@ -57,7 +57,7 @@ uses
   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
@@ -410,7 +410,7 @@ begin
         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);
@@ -423,7 +423,7 @@ begin
 
     {$IF not DEFINED(HEADLESS)}
     SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, SDL_MOUSEWHEEL, SDL_MOUSEMOTION:
-      evSDLCB(ev);
+      fuiOnSDLEvent(ev);
     {$ENDIF}
 
     SDL_TEXTINPUT:
@@ -431,7 +431,7 @@ begin
         Utf8ToUnicode(@uc, PChar(ev.text.text), 1);
         keychr := Word(uc);
         if (keychr > 127) then keychr := Word(wchar2win(WideChar(keychr)));
-        CharPress(AnsiChar(keychr));
+        if (keychr > 0) and (keychr <= 255) then CharPress(AnsiChar(keychr));
       end;
 
     // other key presses and joysticks are handled in e_input
@@ -803,7 +803,7 @@ begin
     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;