Depends on your implementation, but you may have something along these lines in your code:
Code:
bool isSelected[3] = { TRUE, FALSE, FALSE };
short int selection = 0;
Code:
int DrawGLScene(GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-1.0f);
glColor3f(0.0f, 0.0f, isSelected[0] ? 1.0f : 0.5f);
glRasterPos2f(-0.1f, 0.1f);
glPrint("New Game");
glColor3f(0.0f, 0.0f, isSelected[1] ? 1.0f : 0.5f);
glRasterPos2f(-0.1f, 0.0f);
glPrint("Load Game");
glColor3f(0.0f, 0.0f, isSelected[2] ? 1.0f : 0.5f);
glRasterPos2f(-0.1f, -0.1f);
glPrint("Exit Game");
return TRUE;
}
...and psudocode for you keypresses may be
Code:
if (UP is pressed) {
isSelected[selection] = !isSelected[selection];
if (selection > 0)
selection = selection - 1;
else
selection = 2;
isSelected[selection] = !isSelected[selection];
}
if (DOWN is pressed) {
isSelected[selection] = !isSelected[selection];
if (selection < 2)
selection = selection + 1;
else
selection = 0;
isSelected[selection] = !isSelected[selection];
}
if (ENTER is pressed) {
switch (selection) {
case 0:
NewGame();
case 1:
LoadGame();
case 2:
return 0;
}
}
Just to give you an idea of what would be going on.