TIGSource Forums

Developer => Technical => Topic started by: Bocom on March 27, 2010, 04:20:24 AM



Title: In-game menu using flixel?
Post by: Bocom on March 27, 2010, 04:20:24 AM
I want to create an in-game menu in flixel, sort-of like a stats menu in an RPG game. I figured that using states would be the way to go, but I can't figure out how to do it right.

I've been looking for an answer, but I haven't found anything yet, so if someone could point me in the right direction (either by linking or helping out directly here in the thread), I would greatly appreciate it.


Title: Re: In-game menu using flixel?
Post by: moi on March 27, 2010, 07:28:22 AM
put all the buttons and pictures to display in the constructor method of each state so that it is displayed a the start of the state.
Put all interactions either in update() or in functions that will be passed as parameters in the button creation.
It's really easy.


Title: Re: In-game menu using flixel?
Post by: Bocom on March 27, 2010, 05:46:14 PM
put all the buttons and pictures to display in the constructor method of each state so that it is displayed a the start of the state.
Put all interactions either in update() or in functions that will be passed as parameters in the button creation.
It's really easy.

That much I can understand, the problem is switching the states. I don't know how to switch the states so that I can save and load the positions and properties of objects in the previous state when entering/exiting the menu.


Title: Re: In-game menu using flixel?
Post by: moi on March 27, 2010, 09:40:35 PM
I've only done small scale projects in Flixel and I'm not an expert, but when I want variables that don't change between states, I put them in the FlxG class (just like score, lives, etc)
That said you had better ask your question on the flixel forums.


Title: Re: In-game menu using flixel?
Post by: Bocom on March 28, 2010, 05:15:56 AM
I've only done small scale projects in Flixel and I'm not an expert, but when I want variables that don't change between states, I put them in the FlxG class (just like score, lives, etc)
That said you had better ask your question on the flixel forums.

Hmm, that sounds like an idea that I might as well try out. If it doesn't work out, then I'll ask on the flixel forums like you suggested. Thanks anyway. :)