Showing and hiding my GUI

38 views
Skip to first unread message

varomix WEY

unread,
Aug 13, 2015, 11:34:16 PM8/13/15
to HaxeFlixel

Hey guys I need your help


I'm making this little game that will start a tutorial series, I have everything done I'm just having trouble showing the options menu I made.

So I made a separate class for the Options menu, is a FlxTypeGroup<FlxSprite>

in there it handles the Restart, quit and closing the menu,

then I create an instance of it in the PlayState and add it, it's starting visible to test for now, the issue comes when I try to show the options menu from the PlayState after I close it the first time I can't figure out how to actually show it again, right now I'm hiding it by doing

visible = false;
active
= false;


but I don't have access to those attributes from the PlayState.


what can I do?


thanks


varomix WEY

unread,
Aug 14, 2015, 12:45:08 AM8/14/15
to HaxeFlixel
Ok I solved it
I was trying to call the function from a Static function and that wasn't working
that static thing still gets me, need to really understand all those "modes" or whatever they are called.

Xavier Belanche

unread,
Aug 14, 2015, 7:44:13 AM8/14/15
to HaxeFlixel
Maybe you can use FlxSubstate instead of a FlxSprite? Take a look at this thread:


The SubState demo of Gama11 is pretty straightforward!

varomix WEY

unread,
Aug 14, 2015, 11:03:15 AM8/14/15
to HaxeFlixel
oh my god that's way better, did not know about the substate
thank you Xavier
Reply all
Reply to author
Forward
0 new messages