Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MoodyBlues on Wed 04/02/2009 22:52:16

Title: Displaying Images in a GUI
Post by: MoodyBlues on Wed 04/02/2009 22:52:16
Is there a way to display an image in the GUI when the user clicks a button?

Note:  I don't want just a background image.  I'd like the GUI to support having multiple copies of the same image in the GUI at a time.
Title: Re: Displaying Images in a GUI
Post by: GarageGothic on Thu 05/02/2009 00:18:34
Buttons is probably the easiest way to go. Just make as many buttons as you want images displayed at the same time, make them non-clickable and change the button's Graphic property to display the image on it. You can use the Button.Visible property to hide the buttons that aren't currently used to display images.
Title: Re: Displaying Images in a GUI
Post by: Khris on Thu 05/02/2009 00:22:31
Alternatively, you can compose the image using a DynamicSprite and its DrawingSurface, then set it as GUIBackground.
Title: Re: Displaying Images in a GUI
Post by: MoodyBlues on Thu 05/02/2009 00:24:07
Hey, thanks!  I've been messing around in the GUI editor, and using buttons seems like the easiest route.