Jump to content
  • Advertisement


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


Option Screen help need

This topic is 5544 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would make an option screen or a start game screen in Direct3D (9.0). It is a simple bitmap of background and 2 buttons START GAME and EXIT. How can i make these two buttons so i can handle them by the mouse? P.s. The game is FullScreen

Share this post

Link to post
Share on other sites
a quick and easy way to do it is just to draw the buttons onto the bitmap, and check if mouse clicks are within a box that surrounds the two options.

or you could work out a real GUI, or use a 3rd party one from somewhere...

Share this post

Link to post
Share on other sites
Just take the time and implement your own version of menu system so that you can change it easily later.

The principle behind drawing 2D menu over 3d engine in the background is to create rectangles (2 triangles) with the texture of the menu with RHW component (RHW=1)

// Custom FVF, which describes our Menu rectangle vertex structure

FLOAT x, y, z, rhw; // The position for the vertex

D3DCOLOR color; // The vertex color

FLOAT tu,tv; // Tex.coordinate


The coordinates for triangles are normal screen coordinates (0,0 ->1024x768), for every vertex, RHW=1.0f and z=0.0f and that`s it. You render it normally through VB as any other 3d object and you have a nice 2D menu over the 3d engine in the background.

Then just take the current mouse position and compare it if it is in the range of the menu and check pressing of mouse buttons and you`re done.

Avenger 3D game

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!