Archived

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

Dirple

directdraw menu

Recommended Posts

Dirple    122
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

Share this post


Link to post
Share on other sites
djsomers    123
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

Share this post


Link to post
Share on other sites
krez    443
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)

Share this post


Link to post
Share on other sites