Embedded Mogre and MOIS?

DarkHorizon

27-04-2009 19:21:28

In the situation where my Mogre window is a child to a Windows.Form, is there a preferred method to pass input events from the Windows.Form to MOIS? Alternatively, is there a way OIS can override Windows.Forms input events?

I ask, because I am attempting to use MOIS in my Windows.Form+Mogre app. The mouse goes into exclusive mode, but the MOIS events I have linked to mouse/keyboard never get touched when I attempt to generate events.

Thanks!

AndroidAdam

28-04-2009 04:18:16

I'm assuming you have a render loop or frame listener set up somewhere, correct? I know MOIS is similar to xna's input system, so inside your render loop you should do something like this:



KeyboardState input; //declare outside render loop

//inside render loop.

input = Keyboard.GetState();

if(input.IsKeyDown(Keys.Enter))
{
MessageBox.Show("Hi");
}