3

I would like to overlay own content above a Direct3D v9 game (made by a third party).

Overlay Interactive Button

Specifically, I would like to overlay a clickable button control, like Steam does, for instance, though I'm attempting a much simpler interface.

Steam Overlay

Ideally, I would be able to overlay a WPF button or a Windows Form button or whole UserControl, but if that is not possible then creating a functioning button from primitives would suffice as well.

Text Overlay Working with SharpDX

How to Overlay a Button or UserControl with SharpDX

I looked through relevant samples in https://github.com/sharpdx/SharpDX-Samples but was not able to find a way to include or draw native controls with SharpDX

  • Is it possible?
  • If not, are there any samples of drawing a clickable button from scratch?
  • Please bear in mind I'm a novice in the DirectX world :)
Community
  • 1
  • 1
Cel
  • 6,467
  • 8
  • 75
  • 110

1 Answers1

1

Your biggest problem isn't going to be getting the controls to render on top of a DX scene; it's going to be getting them to respond to input afterwards. You can probably rig up a way to get the visuals copied to a DX surface, but I have no idea how you would capture input, translate it, and deliver it back to the WPF components. If it's even possible, it's almost certainly more trouble than it's worth.

There are a couple game-oriented Xaml solutions out there that you may want to check out. WPF for Games is a partial C++ implementation of WPF based on Direct3D, and there's also the proprietary Noesis GUI.

Mike Strobel
  • 25,075
  • 57
  • 69
  • As there is no documentation for WPF for Games, I presume they have a button implemented there somewhere and is it possible to use the library in a C# project and inject the button with SharpDX ? – Cel Oct 29 '14 at 08:45