Game Menus

This is a discussion on Game Menus within the Game Programming forums, part of the General Programming Boards category; Can someone please give me a link to a tutorial that shows how to make menus in c++. Thanks....

  1. #1
    using namespace Trooper; St0rmTroop3er's Avatar
    Join Date
    Sep 2003
    Posts
    77

    Game Menus

    Can someone please give me a link to a tutorial that shows how to make menus in c++. Thanks.
    Your mom is like a struct, she has no class

    How many C programmers does it take to screw in a light bulb? One to do it, 99 to tell him how to do it faster.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    OS? API?
    Away.

  3. #3
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    You know what? There are way too many ways to list them all right here.

  4. #4
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    Perhaps he ment implementing a menusystem in a game.

    Heres what I like to do - branch the game loop to two sections:
    The first section is menu section
    The second section is the game section

    Toggled by a boolean flag you either render the game, or you render the menu - you can also add update functions for the game in the menu too - if you dont want to pause certain events.


    As far as menu structure goes i start with a menu item:
    Code:
    struct sMenuItem {
    	int top;	// top left corner to start drawing menu item
    	int left;	
    	int height;	// how much space is this item going to take up?
    	int height;
    	media content;	// all in one abstract graphic interface for easy art->Render(); :)
    			// .. could be text, could be pictures,could be sound - yippe
    	bool interact;	// does this thing interact with user? clicks - mouse over etc.
    	lpfn focus;	// function pointer to the fucus function you want to use
    			// .. could vary between graphic items, list items, check box etc.
    	lpfn action;	// function pointer to the function this item enacts when clicked 
    	sMenuItem *dependant; // this item could control another itme: Ie. the arrow in drop down lists
    	smenuItem *depends;   // thsi item might depend on another item: ie. the arrow in drop down lists  heh
    }
    Then I might make a class or another struct for actual menu's that has an array of menu items. I push what ever items into what ever menu i want.

    I got a lot of ideas working with quake 3 sdk. That thing has been the light unto my path for inspiration I come to realize. I've learned so much tinkering with it.

    Either way - I've lost interest in further tutorage on this subject - so instead I'll post some old code for the menu system of my direct x game XWORM! or something like that ....



    LOL - after downloading my game source from a siteI gave it to- i remembered how lazy i got with comments. Sorry.
    Attached Files Attached Files
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  5. #5
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    and the .h file has the struct definitions.


    Btw, I make no claims as to the cleanliness, effectiveness, or correctness in the coding of, or implimenting of, my ideas.
    Attached Files Attached Files
    • File Type: h ui.h (1.5 KB, 116 views)
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  3. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  4. C++ Game of Life Program
    By rayrayj52 in forum C++ Programming
    Replies: 16
    Last Post: 09-26-2004, 03:58 PM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21