From cf1102dac69a569279ae05dd95426d9e1c544ffc Mon Sep 17 00:00:00 2001 From: jaybinks Date: Sat, 22 Sep 2007 08:15:59 +0000 Subject: 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 --- Game/Code/Menu/UMenu.pas | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Game/Code/Menu/UMenu.pas') 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; -- cgit v1.2.3