diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-22 08:15:59 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-22 08:15:59 +0000 |
commit | cf1102dac69a569279ae05dd95426d9e1c544ffc (patch) | |
tree | 48dbf78fa62ab1d86dbdbd23df83172181906880 /Game/Code/Menu | |
parent | 217cd16e10ff809e7382e5447f1ccde60f3e8564 (diff) | |
download | usdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.tar.gz usdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.tar.xz usdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.zip |
minor bug fixes to have lazarus build load resources into SDL_Image
correctly... ( lazarus Resources are weak compared to delphi :( )
also Laz build will now run, and main loop works properly.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@429 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Menu')
-rw-r--r-- | Game/Code/Menu/UMenu.pas | 18 |
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;
|