Răsfoiți Sursa

Reduce usage of getCursorPosition

Ivan Savenko 2 ani în urmă
părinte
comite
d99fab8496
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      client/gui/EventDispatcher.cpp

+ 2 - 2
client/gui/EventDispatcher.cpp

@@ -155,7 +155,7 @@ void EventDispatcher::dispatchShowPopup(const Point & position)
 		if(!vstd::contains(rclickable, i))
 			continue;
 
-		if( !i->receiveEvent(GH.getCursorPosition(), AEventsReceiver::LCLICK))
+		if( !i->receiveEvent(position, AEventsReceiver::LCLICK))
 			continue;
 
 		i->showPopupWindow(position);
@@ -178,7 +178,7 @@ void EventDispatcher::handleLeftButtonClick(const Point & position, bool isPress
 		if(!vstd::contains(lclickable, i))
 			continue;
 
-		if( i->receiveEvent(GH.getCursorPosition(), AEventsReceiver::LCLICK))
+		if( i->receiveEvent(position, AEventsReceiver::LCLICK))
 		{
 			if(isPressed)
 				i->clickPressed(position);