Menu System
-
Joe_Oliveri
- Posts: 448
- Joined: Tue Oct 05, 2004 3:24 am
- Location: Boston, MA
Menu System
How did you guys do your menu systems? What Image format did you use and how did you code it?
Irrlicht Moderator || Game Designer
Learn the basics at </dream.in.code>
Learn the basics at </dream.in.code>
Well, most systems like that are made by using C++'s lovely Object-Oriented-Programming. Have a class called "menu", with a list over pointers to classes called "menuitem", that has functions like menuitem->drawme(IVideoDriver* videodrv), and it knows it's X, and Y position on the screen, and it's text (caption) with private variables, and you have a few inline wrapper functions to set and get those coordinates and caption. If you want to use an image, or if you want to have some sort of algorithm to draw it, is up to you. Using an image is definitly easiest, but you are more or less restricted to one size then. It's all up to you
. Assuming you know C++ quite well, this shouldn't be a problem. If you are new to C++, then I know (of my earlier experiences), that your code will be both ugly, and slow, hehe
.
-
Joe_Oliveri
- Posts: 448
- Joined: Tue Oct 05, 2004 3:24 am
- Location: Boston, MA
Thank you for your replies, However one problem, would calling a scene node would still have my game running behind it. how would you solve this?
Irrlicht Moderator || Game Designer
Learn the basics at </dream.in.code>
Learn the basics at </dream.in.code>
Yeah you can write your own skin for the GUI, as far as running behind, can you not just call the update everytime round in the render loop?? Then just call the relevant draw methods, unless your looking for pausing, which as far as I know, can be awkward to pause irrlicht, I've never tried it myself, however, IrrlichtNX++ has support for it. As far as I know this has been changed in 0.8, as far as I can remember from the change log, but I might have missed it, been a loooong wk....
-
Joe_Oliveri
- Posts: 448
- Joined: Tue Oct 05, 2004 3:24 am
- Location: Boston, MA
Ok thank you every one. I will put your tips to good use. I agree it has been a long week.
Irrlicht Moderator || Game Designer
Learn the basics at </dream.in.code>
Learn the basics at </dream.in.code>