diff --git a/src/gx/gh_ui.pas b/src/flexui/fui_ctls.pas
similarity index 99%
rename from src/gx/gh_ui.pas
rename to src/flexui/fui_ctls.pas
index 16281c60fdafad7e6636434336cc8f0283b6254d..8c3834e37bc3f6f79c3624a99cfd7a49e661fe9f 100644 (file)
rename from src/gx/gh_ui.pas
rename to src/flexui/fui_ctls.pas
index 16281c60fdafad7e6636434336cc8f0283b6254d..8c3834e37bc3f6f79c3624a99cfd7a49e661fe9f 100644 (file)
--- a/src/gx/gh_ui.pas
+++ b/src/flexui/fui_ctls.pas
*)
{$INCLUDE ../shared/a_modes.inc}
{$M+}
-unit gh_ui;
+unit fui_ctls;
interface
uses
SysUtils, Classes,
SDL2,
- gh_ui_common,
- gh_ui_style,
- sdlcarcass, glgfx,
+ sdlcarcass,
+ fui_common, fui_events, fui_style,
+ fui_gfx_gl,
xparser;
// ////////////////////////////////////////////////////////////////////////// //
var
- gh_ui_scale: Single = 1.0;
+ fuiRenderScale: Single = 1.0;
implementation
uses
- gh_flexlay,
+ fui_flexlay,
utils;
processKills();
if (evt.eaten) or (evt.cancelled) then exit;
ev := evt;
- ev.x := trunc(ev.x/gh_ui_scale);
- ev.y := trunc(ev.y/gh_ui_scale);
- ev.dx := trunc(ev.dx/gh_ui_scale); //FIXME
- ev.dy := trunc(ev.dy/gh_ui_scale); //FIXME
+ ev.x := trunc(ev.x/fuiRenderScale);
+ ev.y := trunc(ev.y/fuiRenderScale);
+ ev.dx := trunc(ev.dx/fuiRenderScale); //FIXME
+ ev.dy := trunc(ev.dy/fuiRenderScale); //FIXME
try
if (uiGrabCtl <> nil) then
begin
processKills();
if (evt.eaten) or (evt.cancelled) then exit;
ev := evt;
- ev.x := trunc(ev.x/gh_ui_scale);
- ev.y := trunc(ev.y/gh_ui_scale);
+ ev.x := trunc(ev.x/fuiRenderScale);
+ ev.y := trunc(ev.y/fuiRenderScale);
try
if (Length(uiTopList) > 0) and (uiTopList[High(uiTopList)].enabled) then uiTopList[High(uiTopList)].keyEvent(ev);
//if (ev.release) then begin ev.eat(); exit; end;
ctl: TUIControl;
begin
processKills();
- gxBeginUIDraw(gh_ui_scale);
+ gxBeginUIDraw(fuiRenderScale);
try
for f := 0 to High(uiTopList) do
begin
procedure TUIControl.setScissorGLInternal (x, y, w, h: Integer);
begin
if not scallowed then exit;
- x := trunc(x*gh_ui_scale);
- y := trunc(y*gh_ui_scale);
- w := trunc(w*gh_ui_scale);
- h := trunc(h*gh_ui_scale);
+ x := trunc(x*fuiRenderScale);
+ y := trunc(y*fuiRenderScale);
+ w := trunc(w*fuiRenderScale);
+ h := trunc(h*fuiRenderScale);
scis.combineRect(x, y, w, h);
end;
var
nsz: TLaySize;
begin
- nsz := TLaySize.Create(trunc(gxScreenWidth/gh_ui_scale)-mFrameWidth*2-6, trunc(gxScreenHeight/gh_ui_scale)-mFrameHeight*2-6);
+ nsz := TLaySize.Create(trunc(fuiScrWdt/fuiRenderScale)-mFrameWidth*2-6, trunc(fuiScrHgt/fuiRenderScale)-mFrameHeight*2-6);
if (mMaxSize.w < 1) then mMaxSize.w := nsz.w;
if (mMaxSize.h < 1) then mMaxSize.h := nsz.h;
end;
begin
if (mWidth > 0) and (mHeight > 0) then
begin
- mX := trunc((gScrWidth/gh_ui_scale-mWidth)/2);
- mY := trunc((gScrHeight/gh_ui_scale-mHeight)/2);
+ mX := trunc((fuiScrWdt/fuiRenderScale-mWidth)/2);
+ mY := trunc((fuiScrHgt/fuiRenderScale-mHeight)/2);
end;
end;
begin
inherited;
mHoriz := false;
- writeln('VBOX: ', canFocus, ':', enabled);
end;