Creating Main Menus in Direct3d?
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 :)
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement