Making Menus
Is there a good way to make a menu system? (ala UT)
I could map a picture on a quad and grab the mouse position. Is there a better way? And while I''m at it how to I get the mouse buttons states?
L.I.G. == Life Is Good
To get your mouse button states, you check for messages in your WndProc function:
Regarding your menu, you could build a Display List of Textured Triangle Strips for your buttons, with both normal and highlighted states. I''d use that rather than one big quad, but hey, it''s up to you.
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
WM_USER + 1 : switch (lParam) {
case WM_RBUTTONDOWN :
// Right Mouse Event
break;
case WM_LBUTTONDOWN :
// Left Mouse Event
break;
}
Regarding your menu, you could build a Display List of Textured Triangle Strips for your buttons, with both normal and highlighted states. I''d use that rather than one big quad, but hey, it''s up to you.

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Thanks for the info on mouse states. But I don''t quite understand what you said about my menu stuff. I barely know what triangle strips are. Could you please go into a little more detail?
L.I.G. == Life Is Good
February 18, 2001 10:24 PM
You can emial romka and ask for menudemo.zip and menudemo_scr.zip.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement