Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Rui 'Trovatore' Pires on Mon 17/01/2005 19:36:19

Title: Disabled buttons still drawn?
Post by: Rui 'Trovatore' Pires on Mon 17/01/2005 19:36:19
Maybe I'm screwing up, but I don't see how I possibly could on this one - if it IS my mistake, it's the third time I make it...

I SPECIFICALLY disable certain GUI controls, such as "txtSave" textbox, or some buttons... and I set, in Game Options, "GUIs turn off when disabled". The manual says "The control will be drawn according to the game "When GUI Disabled" settings, as usual." Shouldn't the control, therefore, not be drawn, seeing as it's disabled? Because it's still there.
Title: Re: Disabled buttons still drawn?
Post by: Pumaman on Mon 17/01/2005 20:18:32
In terms of the individual controls, only the Button currently supports the full range of disabled styles. Thanks for bringing it up actually, it could do with being sorted out.
Title: Re: Disabled buttons still drawn?
Post by: Rui 'Trovatore' Pires on Mon 17/01/2005 20:53:57
So what can I do about that textbox? Don't tell me I have to put it in a brand new GUI and then superimpose that GUI over SAVE gui... :P

...on the other hand, I think that's exactkly how Proskrito did it in his Scumm templates... ah well. I'll do it for now, glad to have brought something useful up anyway.
Title: Re: Disabled buttons still drawn?
Post by: Radiant on Mon 17/01/2005 21:18:15
If it's a textbox, you can set its contents to empty.
Or, for anything else, you can use SetGuiObjectPosition to something outrageous like (1000, 1000)
Title: Re: Disabled buttons still drawn?
Post by: Rui 'Trovatore' Pires on Mon 17/01/2005 21:40:35
The thing is, the textbox will still (I think) intercept commands from the keyboard wherever it is... and though I set it to empty, the "little line at the bottom" still shows. Thanks anyway.

...wait a minute, but I don't NEED to use the "enter" or "a-z" keys... maybe I WILL reposition the textbox. Thanks!
Title: Re: Disabled buttons still drawn?
Post by: Pumaman on Mon 17/01/2005 22:20:28
If the text box is disabled, it will not intercept keypresses. Thus, setting Enabled to false and moving it off the edge of the screen should do the trick as a workaround.
Title: Re: Disabled buttons still drawn?
Post by: Rui 'Trovatore' Pires on Tue 18/01/2005 06:32:50
Ah, gotcha! Thankee kindly!