greenya wrote:I was not able to achieve this. You can try also. If you will get any positive results - feel free to share.
Got the user events working
Well mouse movement works.
I've added a mouse move event to the render panel, which creates a new event and posts it to irrlicht:
Code: Select all
private void panelRenderingWindow_MouseMove(object sender, MouseEventArgs e)
{
int mouseX = e.X;
int mouseY = e.Y;
IrrlichtLime.Event irrEvt = new IrrlichtLime.Event ( IrrlichtLime.MouseEventType.Move, mouseX, mouseY );
if (dev != null)
dev.PostEvent (irrEvt);
}
I also added an event handler to the device.
Code: Select all
dev.OnEvent += new IrrlichtDevice.EventHandler ( device_OnEvent );
device_OnEvent looks like:
Code: Select all
static bool device_OnEvent(Event evnt)
{
if (evnt.Type == EventType.Mouse)
{
if ( evnt.Mouse.Type == MouseEventType.Move )
Console.WriteLine("Mouse Move Event: {0}, {1}", evnt.Mouse.X, evnt.Mouse.Y);
}
return false;
}
Hope this helps some one.