aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Menu/UMenu.pas18
1 files changed, 13 insertions, 5 deletions
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index ccce325e..16bc4ab2 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -287,15 +287,23 @@ begin
end;
procedure TMenu.AddBackground(Name: string);
+var
+ lFileName : string;
begin
if Name <> '' then
begin
// BackImg := Texture.LoadTexture(false, PChar(Skin.SkinPath + FileName), 'JPG', 'Plain', 0); // new theme system
- BackImg := Texture.GetTexture(Skin.GetTextureFileName(Name), 'Plain');
- BackImg.W := 800;
- BackImg.H := 600;
- BackW := 1;
- BackH := 1;
+ lFileName := Skin.GetTextureFileName(Name);
+
+ if lFileName <> '' then
+ begin
+ BackImg := Texture.GetTexture( lFileName , 'Plain');
+
+ BackImg.W := 800;
+ BackImg.H := 600;
+ BackW := 1;
+ BackH := 1;
+ end;
end;
end;