🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

menus

Started by
5 comments, last by AnthonyG 17 years, 5 months ago
Hey I am trying to create my own zelda-like game editor. What is a good way to learn how to create standard File, Edit, View menus that you can access with your mouse? I mean should I create my own menus with OpenGL or is there an easy way to utilize some tools windows already has? I mean I'm picturing something like the Warcraft II game editor. It would have opengl graphics in the viewing area but be within a window with drop down menus.
Advertisement
Essentially a menu is just a picking method. I.E. Get the cursor's position relevant to the UI control or what have you. I know someone wrote a UI framework in the GameDev archives. Check there, Get some ideas to write your own :)
-AnthonyG
Yeah, I know how to do picking and I could create my own. I'm just wondering if it's really necessary. Everything I know is from the nehe site. Everything there is built as a win32 app and your whole screen is openGL. But I'm sure there's a way to use VC++ to create a standard window with the dropdown menus built into it already and I could render openGL within the window. I just don't know where to look to learn how to do it.
Ah, I see what you mean :D.

It's easy to have a dropdown menu in an OGL app.

I've not used this with fullscreen so I'm not sure if it will still draw.

In you WNDCLASS, specify

wc.lpszMenuName=MAKEINTRESOURCE(MENUCONSTANT);


Simple as that, In your callback function, you will recieve the IDs of the clicked menu items via wParam as usual.

I also remember using CreateWindow to make controls without specifying a parent and it showed fine over the client (Drawing) area. Remember that if you move the window, the control won't move with it(Due to no parent being specified).
-AnthonyG
Hey, thanks. If you know any good books to check out on that subject let me know.
Book hm? I learned via many TIAS sessions and coffee :)
-AnthonyG
Here's a resource for you :)

http://www.winprog.org/tutorial/index.html
-AnthonyG

This topic is closed to new replies.

Advertisement