3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Game Menu  (Read 104 times)

« on: June 15, 2014, 07:32:14 AM »
I have seen Game Menu in FourDee's Tr-Zero.That menu can be controlled by Arrow Keys.Anybody know how to create a Menu controlling by Arrow Keys.
« Reply #1 on: June 16, 2014, 02:24:33 AM »
Using iKeyDown(iKeyCode("")), with "DIK_LEFT", "DIK_RIGHT", "DIK_UP" and "DIK_DOWN"...

 ::)

EDIT: I found psikoTs menu system: http://www.3drad.com/forum/index.php?topic=9107.msg76749#msg76749
It's very good, I'm currently using (my own version of) this method.
« Last Edit: June 16, 2014, 02:27:23 AM by RobertooMolvadoo »
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #2 on: June 16, 2014, 03:51:05 AM »
No need to roll them eyes ::) it's a valid question, but I think it might have been answered a zillion times before... Not exactly rocket science, but you need a variable to track the bar position and increase and decrease that var with the arrow keys. Then you need a variable to know what menu you're at (main menu, options menu, character menu etc.) this could be a string, so you can just set that sting to the menu you wanna go to.

some pseudo code:

int BarPos;
string currentMenu;

if(currentMenu== Main){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
if(currentMenu== Options){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
« Last Edit: June 19, 2014, 04:16:36 AM by Sondre S. »
"Believe you can, and you're halfway there."
- Theodore Roosevelt
« Reply #3 on: June 16, 2014, 04:35:57 AM »
No need to roll them eyes it's valid question...

I'm 'rolling them eyes' because this question is one of those 'how do I make a game' question. It might be valid, but since there are hundreds ways to do it, it doesn't have a solid answer.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #4 on: June 16, 2014, 05:12:21 AM »
Thanks to everyone who helped me.
Pages: [1]