mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Reduce usage of getCursorPosition
This commit is contained in:
parent
0deeff30b9
commit
d99fab8496
@ -155,7 +155,7 @@ void EventDispatcher::dispatchShowPopup(const Point & position)
|
|||||||
if(!vstd::contains(rclickable, i))
|
if(!vstd::contains(rclickable, i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( !i->receiveEvent(GH.getCursorPosition(), AEventsReceiver::LCLICK))
|
if( !i->receiveEvent(position, AEventsReceiver::LCLICK))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
i->showPopupWindow(position);
|
i->showPopupWindow(position);
|
||||||
@ -178,7 +178,7 @@ void EventDispatcher::handleLeftButtonClick(const Point & position, bool isPress
|
|||||||
if(!vstd::contains(lclickable, i))
|
if(!vstd::contains(lclickable, i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( i->receiveEvent(GH.getCursorPosition(), AEventsReceiver::LCLICK))
|
if( i->receiveEvent(position, AEventsReceiver::LCLICK))
|
||||||
{
|
{
|
||||||
if(isPressed)
|
if(isPressed)
|
||||||
i->clickPressed(position);
|
i->clickPressed(position);
|
||||||
|
Loading…
Reference in New Issue
Block a user