4
\$\begingroup\$

Im currently working on a 2D Game where the users can interact with specific nodes and are able to edit certain bits of information and I also plan for the users to be able to click buttons to set specific information.

My problem is that I do not know how to write code to create a side menu/UI system where information can be passed to it and displayed and also be edited by the system.

If anyone has any tutorials or material that they would be able to point me towards that they think would be helpful with this would be very appreciated as I do not know where to begin with this. Note that at the moment I am willing to swap from DirectX to OpenGL if that would be easier though I would prefer to stick to DirectX if possible

Thanks

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

It really depends what you want to do and with what technology:

  • If it's a Win8 Metro game you could use XAML.
  • You can also use a DirectX 2D overlay. This example shows how to make UI with it and handle interaction with it.
  • If you want to enable interaction with 3D objects in your game (on click), this tutorial from Microsoft should help.

These are all Win8 app resources, but this should give you an idea for what to search for if you're targeting Win32.

\$\endgroup\$
4
  • \$\begingroup\$ its not going to be a Metro game so I wont be using XAML, I will have a look at then examples you have posted to see if they are useful. \$\endgroup\$
    – Elliott
    Feb 28, 2013 at 12:31
  • \$\begingroup\$ would it be possible to have the DirectX 2D overlay ontop of a directX 2d Viewport? \$\endgroup\$
    – Elliott
    Feb 28, 2013 at 16:24
  • \$\begingroup\$ Absolutly. It's even preferable to separate game HUD(overlay) and rendering game content which can be either 2D or 3D. You have to make seperate context, device and factory. Sorry it's Win8 example again but it shows rendering overlay on top of DirectX 2D so might help you Example from Microsoft \$\endgroup\$
    – Lufi
    Feb 28, 2013 at 23:32
  • \$\begingroup\$ Im planning on having a render screen for the game and then overlay the menu with a separate directX menu, thanks for your response I will check it out, and im sure that I will be able to get useful info from it even if its a win8 \$\endgroup\$
    – Elliott
    Mar 1, 2013 at 11:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .