I tried something, but it doesnt works, heres my code. It seems, i need to covert absolute cursor position to relative. Can you plese help me how to correctly handle mouse input?
Code: Select all
switch(message)
{
case WM_MOUSEMOVE:
{
bool test = CEGUI::System::getSingleton().injectMouseMove((float)LOWORD(lParam),(float)HIWORD(lParam));
if(!test)
CEGUI::MouseCursor::getSingleton().setImage("TaharezLook", "MouseArrow");
}
break;
case WM_LBUTTONDOWN:
{
CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);
}
break;
case WM_LBUTTONUP:
{
CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);
}
}
EDIT: I found CEGUI api function, that uses exact coordinates. So you just need to use it and everyhing is working correctly