Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: barefoot on Sat 12/02/2011 14:44:22

Title: SOLVED: Puzzled by GUI Button
Post by: barefoot on Sat 12/02/2011 14:44:22
Hi

I'm puzzled why a button on a GUI sometimes does not show! I have a number of buttons but a particular one sometimes does not show at other times it does show.

I'm have put the button in 'front'

Any thoughts?

cheers

barefoot
Title: Re: Puzzled by GUI Button
Post by: Matti on Sat 12/02/2011 16:23:56
Um... code?
Title: Re: Puzzled by GUI Button
Post by: monkey0506 on Sat 12/02/2011 18:00:42
I too would be puzzled why if I randomly threw "btnButton.Visible = false;" into my scripts at predetermined intervals why my buttons would be disappearing.

:-\

The buttons aren't going to just disappear unless they're being told to. I'd suggest checking your setting for when the interface is disabled but clearly it's only this one button, so probably not relevant. Check your scripts to figure out where you're turning the button off.
Title: Re: Puzzled by GUI Button
Post by: barefoot on Sun 13/02/2011 08:05:36
Hi

cheers monkey

It appears, on checking, that when I made and deleted some buttons on the GUI it altered the button numbers... anyhow, I have gone over it and made the new adjustments and it seems to be working fine now.. :=


function Button15_OnClick(GUIControl *control, MouseButton button)
{   
      if (cSlocombe.View==4)
{

gdiary6.Visible=false;
gInventory.Visible=true;
 
}
   
    else if (cSlocombe.View==11)
{
   Display("You fall into a dream state. You can't believe what you have read!");
   cSlocombe.ChangeRoom(5, 584,141);
   gdiary6.Visible=false;
   gInventory.Visible=true;
}
}



I shall have to watch out for this in future!

Thanks

barefoot