Remove simulating mouse events from event handler.
It will be handled in irrlicht device.
This commit is contained in:
parent
bcea2355fa
commit
9c7a438826
@ -144,35 +144,6 @@ bool EventHandler::OnEvent (const SEvent &event)
|
|||||||
DemoWorld::resetIdleTime();
|
DemoWorld::resetIdleTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simulate mouse event for first finger on multitouch device.
|
|
||||||
// This allows to click on GUI elements.
|
|
||||||
if (event.EventType == EET_TOUCH_INPUT_EVENT)
|
|
||||||
{
|
|
||||||
if (event.TouchInput.ID == 0)
|
|
||||||
{
|
|
||||||
if (event.TouchInput.Event == ETIE_PRESSED_DOWN)
|
|
||||||
{
|
|
||||||
SEvent irrevent;
|
|
||||||
irrevent.EventType = EET_MOUSE_INPUT_EVENT;
|
|
||||||
irrevent.MouseInput.X = event.TouchInput.X;
|
|
||||||
irrevent.MouseInput.Y = event.TouchInput.Y;
|
|
||||||
irrevent.MouseInput.Event = EMIE_LMOUSE_PRESSED_DOWN;
|
|
||||||
|
|
||||||
irr_driver->getDevice()->postEventFromUser(irrevent);
|
|
||||||
}
|
|
||||||
else if (event.TouchInput.Event == ETIE_LEFT_UP)
|
|
||||||
{
|
|
||||||
SEvent irrevent;
|
|
||||||
irrevent.EventType = EET_MOUSE_INPUT_EVENT;
|
|
||||||
irrevent.MouseInput.X = event.TouchInput.X;
|
|
||||||
irrevent.MouseInput.Y = event.TouchInput.Y;
|
|
||||||
irrevent.MouseInput.Event = EMIE_LMOUSE_LEFT_UP;
|
|
||||||
|
|
||||||
irr_driver->getDevice()->postEventFromUser(irrevent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.EventType == EET_GUI_EVENT)
|
if (event.EventType == EET_GUI_EVENT)
|
||||||
{
|
{
|
||||||
return onGUIEvent(event) == EVENT_BLOCK;
|
return onGUIEvent(event) == EVENT_BLOCK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user