summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dbcda53)
raw | patch | inline | side by side (parent: dbcda53)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 31 Jan 2022 18:46:04 +0000 (21:46 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 31 Jan 2022 18:46:04 +0000 (21:46 +0300) |
src/game/g_gui.pas | patch | blob | history | |
src/game/opengl/r_gui.pas | patch | blob | history |
diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index a872643f8852be0abc923c45110279a9e8c2415e..988d0909fd5afe24c1cc4501824e6855130e11df 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
{$ENDIF}
{$IFDEF ENABLE_RENDER}
r_gui,
- r_textures, (* load/free image *)
{$ENDIF}
g_sound, SysUtils, e_res,
g_game, Math, StrUtils, g_player, g_options,
procedure TGUIimage.ClearImage();
begin
- if FImageRes = '' then Exit;
-
- g_Texture_Delete(FImageRes);
FImageRes := '';
end;
procedure TGUIimage.SetImage(Res: string);
begin
- ClearImage();
-
- if g_Texture_CreateWADEx(Res, Res) then FImageRes := Res;
+ FImageRes := Res;
end;
procedure TGUIimage.Update();
index 3463a9ea100bc06167283342cceed2a9b1ddc622..8df2b400683901d1f7ff64fedf827beeed961cd6 100644 (file)
procedure r_GUI_GetLogoSize (out w, h: WORD);
procedure r_GUI_GetMaxFontSize (BigFont: Boolean; out w, h: Integer);
procedure r_GUI_GetStringSize (BigFont: Boolean; str: String; out w, h: Integer);
+
procedure r_GUI_Draw_Window (win: TGUIWindow);
implementation
end
else
begin
- if g_Texture_Get(ctrl.ImageRes, ID) then
- e_Draw(ID, ctrl.X, ctrl.Y, 0, True, False);
+ if g_Texture_CreateWADEx(ctrl.ImageRes, ctrl.ImageRes) then
+ begin
+ if g_Texture_Get(ctrl.ImageRes, ID) then
+ e_Draw(ID, ctrl.X, ctrl.Y, 0, True, False);
+ g_Texture_Delete(ctrl.ImageRes);
+ end;
end;
end;