Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: spook1 on Sun 02/04/2006 16:40:03

Title: change gui background pic [SOLVED]
Post by: spook1 on Sun 02/04/2006 16:40:03
I cannot change the background image of my GUI.

Help says:

BackgroundGraphic property
(Formerly known as SetGUIBackgroundPic, which is now obsolete)

int GUI.BackgroundGraphic

Gets/sets the background image of the GUI.
You can set this to 0 to remove the background image from the GUI.

But neither the obsolete or the actual command succeed...

Any suggestions?
Title: Re: change gui background pic
Post by: nihilyst on Sun 02/04/2006 16:41:57
Could you provide the line of code you used to change the GUI's background?
Title: Re: change gui background pic
Post by: spook1 on Sun 02/04/2006 16:46:07
     SetBackgroundFrame(2);
     GUI.BackgroundGraphic = 108;

regards,

Martijn
Title: Re: change gui background pic
Post by: Wretched on Sun 02/04/2006 17:14:52
Gui names should start with a little 'g', what is your GUI called? Code should be more like

gMyGuiName.BackgroundGraphic=108;

Title: Re: change gui background pic
Post by: spook1 on Sun 02/04/2006 20:51:13
thanks for helping. The solution works great. Off course, how would the program know what Gui to adjust...

I got confused by the example in the help, stopped thinking and lack exprience in OO programming ;-(