Advertisement

Menus

Started by August 30, 2000 10:52 PM
1 comment, last by Ecco2000 24 years, 3 months ago
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
"Don't make me come down there..." -GOD
Yeah, make a new class for the menu.
Goblineye EntertainmentThe road to success is always under construction
Advertisement
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..

This topic is closed to new replies.

Advertisement