Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411709 Posts in 69403 Topics- by 58457 Members - Latest Member: FezzikTheGiant

May 20, 2024, 05:17:38 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)In-game menu using flixel?
Pages: [1]
Print
Author Topic: In-game menu using flixel?  (Read 1302 times)
Bocom
Level 0
*


View Profile
« 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.
Logged
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #1 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.
Logged

subsystems   subsystems   subsystems
Bocom
Level 0
*


View Profile
« Reply #2 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.
Logged
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #3 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.
Logged

subsystems   subsystems   subsystems
Bocom
Level 0
*


View Profile
« Reply #4 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. Smiley
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic