I'm thinking about writing an XNA game for Windows. It will have the main game window and another WPF form that has some chat controls or debugging information. When I'm typing something into this auxiliary form, obviously I don't want the main XNA window to see what I'm typing.
What is the best way to do this? I thought that if I can determine if the auxiliary window has the focus, I could ignore any keystrokes in my game loop. But making that determination isn't obvious in XNA. How is this done?
Check Game.IsActive
(MSDN) before responding to any input changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With