Creating Main Menus in Direct3d?

Started by
1 comment, last by Waaayoff 14 years, 1 month ago
I want to add a main menu to my game and was wondering which approach is the best: 1- Just render a sprite of the menu (background, buttons and text) over everything, and check if cursor is above a 'button' whenever the user clicks the mouse. Or: 2- Use Win32 to create a child window containing real buttons. The problem with the second approach is that the buttons and the menu window will look too 'windowsy' for a game. Unless i can use certain style flags to make it look game like? Also, can i add a sprite to a button window? Or is there a better method? 3- ?? PS: I'm not experienced enough to create my own GUI so.. don't ask me to ;) Thanks for your help :)
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "
Advertisement
You can use the first methold; Render a sprite/quad with your button texture.

If you use one button texture the button cannot be resized or it will look ucly. If you want to resize buttons you can use multiple sprites for that, but you need to move multiple sprites if you want to move the control.

You can do this will all controls, unless you dont care for resolution you can just use one sprite for each control :D
Thanks ;)
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "

This topic is closed to new replies.

Advertisement