showing and hiding panels question

Posted By: reknak

showing and hiding panels question - 02/22/11 15:02

Hi guys,

I was seeing NHA RPG template 2.0 mainmenu script, and found a code which shows and hides panels, but it doesn't work in my script.

Code:
mainmenu_pan.visible = true;



I got an error saying that visible is not a member of panel.

Than I looked in the GSmanual and found that visible is now a obsolete keyword, 'show' is now used for it.

So I changed the code to this;

Code:
mainmenu_pan.show = true;



But I get he same error saying that show is not a member of panel.

Anyone knowing what I'm doing wrong? Thanks in advance.
Posted By: MasterQ32

Re: showing and hiding panels question - 02/22/11 16:06

maybe you shouldn't use c-script...
instead i would use the lite-c flag system:
Code:
set(mainmenu_pan,SHOW);


Posted By: reknak

Re: showing and hiding panels question - 02/22/11 21:27

and if I want to the hide the panel? Should I than use this for showing and hiding the panel?:

Code:
toggle(mainmenu_pan,SHOW);


Posted By: Ascalon

Re: showing and hiding panels question - 02/22/11 21:34

use set(mainmenue_pan,SHOW); to show your panel and use
reset(mainmenue_pan,SHOW); to hide a panel
with toggle(mainmenue_pan,SHOW); you can switch always between showing and hiding. it depends on what yo just need
Posted By: reknak

Re: showing and hiding panels question - 02/22/11 21:49

Thanks for the clarification!
© 2023 lite-C Forums