Fixed: #945 mouse click events do not respect mouse position (by rti)
This commit is contained in:
parent
bbf5e94699
commit
3b0c6f752e
1 changed files with 5 additions and 0 deletions
|
@ -331,6 +331,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
_MouseButtonsState = (TMouseButton) (_MouseButtonsState | pEvent->Button);
|
_MouseButtonsState = (TMouseButton) (_MouseButtonsState | pEvent->Button);
|
||||||
|
|
||||||
rIP.setButtonState(_MouseButtonsState);
|
rIP.setButtonState(_MouseButtonsState);
|
||||||
|
updateMousePos((CEventMouse&)event, eventDesc);
|
||||||
|
|
||||||
// handle Event
|
// handle Event
|
||||||
if(pEvent->Button & leftButton)
|
if(pEvent->Button & leftButton)
|
||||||
|
@ -355,6 +356,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
_MouseButtonsState = (TMouseButton) (_MouseButtonsState & ~(pEvent->Button));
|
_MouseButtonsState = (TMouseButton) (_MouseButtonsState & ~(pEvent->Button));
|
||||||
|
|
||||||
rIP.setButtonState(_MouseButtonsState);
|
rIP.setButtonState(_MouseButtonsState);
|
||||||
|
updateMousePos((CEventMouse&)event, eventDesc);
|
||||||
|
|
||||||
// handle Event
|
// handle Event
|
||||||
if(pEvent->Button & leftButton)
|
if(pEvent->Button & leftButton)
|
||||||
|
@ -374,6 +376,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
// TODO: yoyo make it work if needed (for now, seems preferable to manage in each ActionHandler)
|
// TODO: yoyo make it work if needed (for now, seems preferable to manage in each ActionHandler)
|
||||||
|
|
||||||
CEventMouseDblClk* pEvent=(CEventMouseDblClk*)&event;
|
CEventMouseDblClk* pEvent=(CEventMouseDblClk*)&event;
|
||||||
|
updateMousePos((CEventMouse&)event, eventDesc);
|
||||||
|
|
||||||
// handle Event
|
// handle Event
|
||||||
if(pEvent->Button & leftButton)
|
if(pEvent->Button & leftButton)
|
||||||
|
@ -401,6 +404,8 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
else
|
else
|
||||||
_MouseWheel -= 1;
|
_MouseWheel -= 1;
|
||||||
|
|
||||||
|
updateMousePos((CEventMouse&)event, eventDesc);
|
||||||
|
|
||||||
// handle Event now.
|
// handle Event now.
|
||||||
if (_MouseWheel != 0)
|
if (_MouseWheel != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue