Alright, essentially i'm looking to figure out the best way to do things.
Say i have a main menu then a character menu then game, so whats the best way to switch between them?
Should i add all then remove all before i switch betwwen any of the differnt states... if so is there an easy way to do this?
Or should i just be hidding all the unused elements? (seems like unneeded overhead especially during game running)
Building/Switching menus, best practises
-
- Posts: 15
- Joined: Wed Jun 02, 2004 1:53 am
Building/Switching menus, best practises
LittleGiant
As far as I understand when something isn't visable it's not being drawn..
I imagine even though it's not being drawn there is something going on in the background but unless you're programming for a 333mhz computer I think you'll be ok.
Not to sound like a (insert swear word here) but I'm pretty sure this is what game collage would teach you. and since I havent gone to collage I wouldn't have a clue personally.
however I believe niko has and his example of switching through "menu's" using different classes like in the techdemo seems to work very well and be the best way.
anyone care to prove me wrong? be my guest I'd like to know the answer to this question my"uneducated"self.
Now that I think about it I'm not even sure niko wrote the techdemo.
One thing I've learned from working with Irrlicht and other projects is how little the people that usually end up helping you know themselfs.
O well I trust someone with more experience will give there 2 cents and make me look a fool but it's all good... it takes all kinds.
I imagine even though it's not being drawn there is something going on in the background but unless you're programming for a 333mhz computer I think you'll be ok.
Not to sound like a (insert swear word here) but I'm pretty sure this is what game collage would teach you. and since I havent gone to collage I wouldn't have a clue personally.
however I believe niko has and his example of switching through "menu's" using different classes like in the techdemo seems to work very well and be the best way.
anyone care to prove me wrong? be my guest I'd like to know the answer to this question my"uneducated"self.
Now that I think about it I'm not even sure niko wrote the techdemo.
One thing I've learned from working with Irrlicht and other projects is how little the people that usually end up helping you know themselfs.
O well I trust someone with more experience will give there 2 cents and make me look a fool but it's all good... it takes all kinds.
*shameless self plug*
easy answer is to take a look at ICE 3.0
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=6297
easy answer is to take a look at ICE 3.0
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=6297
a screen cap is worth 0x100000 DWORDS
The techdemo uses a whole separate (software) device for the menu. It creates a new one for the actual demo.
A good idea would be to create an invisible (transparent) gui element (e.g. GUITab) for each menu and place the elements on them (make them children). You only need to switch visibility of those tabs then.
Regarding overhead, it will be one call to each invisible tab that returns immediately because of the invisibility. The child elements will not even be looked at. So no deal.
A good idea would be to create an invisible (transparent) gui element (e.g. GUITab) for each menu and place the elements on them (make them children). You only need to switch visibility of those tabs then.
Regarding overhead, it will be one call to each invisible tab that returns immediately because of the invisibility. The child elements will not even be looked at. So no deal.
It is like it is. And because it is like it is, things are like they are.