Turning off Objects within a GUI? [SOLVED]

Started by LeChuck, Tue 01/02/2005 23:24:06

Previous topic - Next topic

LeChuck

I'm in the middle of creating an icon-based dialog system similar to the one in Sam and Max... I'm wondering, is there a way of manipulating Objects / Buttons within a GUI? For example, when the user has clicked an icon and it runs a dialog, I want some buttons to just disappear afterwards.

Please tell me I don't have to use several GUI's to accomplish this...

monkey0506

Hmm... Perhaps you could try SetGUIObjectEnabled. Combine this with a "SetButtonPic(YOURGUI, BUTTONNUMBER, 1, 0)" and the button will become disabled, and "turn off".  ;)

BTW, (I believe) you're new, so welcome to the forums! ;D

notmonkey0506

Hmm... Not a new member, but only 17 posts... Ã, :P

Goot

QuoteSetButtonPic(YOURGUI, BUTTONNUMBER, 1, 0)
Are you sure this won't set the picture to a blue cup? If it does, there's a command (SetGUIObjectPosition?) which sets the coordinates of a GUI object, so you can move it somewhere off the screen when you're done with it.

LeChuck

Quote from: Goot on Wed 02/02/2005 05:13:43
QuoteSetButtonPic(YOURGUI, BUTTONNUMBER, 1, 0)
Are you sure this won't set the picture to a blue cup? If it does, there's a command (SetGUIObjectPosition?) which sets the coordinates of a GUI object, so you can move it somewhere off the screen when you're done with it.

I didn't try the other thing as I really didn't understand it or even look into it, but this worked perfectly. Thanks.

monkey0506

Quote from: Goot on Wed 02/02/2005 05:13:43
QuoteSetButtonPic(YOURGUI, BUTTONNUMBER, 1, 0)
Are you sure this won't set the picture to a blue cup? If it does, there's a command (SetGUIObjectPosition?) which sets the coordinates of a GUI object, so you can move it somewhere off the screen when you're done with it.

Well it depends on the sprite in slot 0.  I believe the default (for the latest versions of AGS) is an empty sprite.  Alternately you could import an empty sprite and use that sprite number in place of 0, which seems to make more sense than setting it to a location that is out of the screen's parameters...

SMF spam blocked by CleanTalk