Archived

This topic is now archived and is closed to further replies.

Menus

This topic is 6349 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making my first game (A pong clone) and am getting to the point where I need to write code for a menu system and was wondering what the best way to go about this would be. Here''s how my game is set up: I have these classes: CDirectDraw CDirectInput CError I have these game functions GameLoop() GameDraw() GameInput() GameProcessKeys() GameMoveObjects() GameInit() GameDestroy() I was thinking maybe a class for the menu system but I don''t know

Share this post


Link to post
Share on other sites
or just make a GameMenu(), which loops through and sees if the user is selecting any of the menu items, then change the game state and call the appropriate function

e.g.

switch(menu_cursor_pos)
{
case NEW_GAME:
GameInit();

case QUIT:
GameDestroy();
}

you get the idea..

Share this post


Link to post
Share on other sites