directdraw menu

Started by
4 comments, last by Dirple 22 years, 5 months ago
Just a quick question, I am new to directx and driectdraw, I am doing just well figuring stuff out on my own, but how do I create a custome menu. One that would be a rectangle and appear in the middle of the screen and let the user use arrow keys to select something off the menu. Like a rpg game menu. I simply just can''t figure it out.....thanks
Advertisement
If you have the DirectX8 SDK, go look at the Donut3D example.
Huh... oh I see..
thats for direct3d....i am asking how to do it for directdraw. sorry about the confusion
Why don''t you use bitmaps, (other another image type) for your menu, depenging where the user clicks you can bring up the image of the menu on screen and then jump to the code to carry out menu ops, depending where on the menu the user clicks, etc.

djsomers
djsomers;)make it idiot proof and someone makes a better idiot!
you basically need to keep track of where the menu is clickable yourself, and then when the menu is visible check each time the used clicks to see if it is in one of these "active" regions. if it is a menu with buttons or a line a text, you can just use RECTs (you can even do it mathematically if the menu items are evenly spaced, ie if the mouse is between the left and right bounds of the menu, get the y value of the mouse and divide it by the height of each menu item; this will give you an integer that tells which item was clicked).

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
thanks everyone for your help...I figured it out and it is working

This topic is closed to new replies.

Advertisement