1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Split mouseDragged event from mouseMoved

This commit is contained in:
Ivan Savenko
2023-06-22 22:11:48 +03:00
parent 0cd19b0a9f
commit 4e7412faa6
17 changed files with 82 additions and 89 deletions

View File

@@ -75,7 +75,7 @@ void InputHandler::handleCurrentEvent(const SDL_Event & current)
void InputHandler::processEvents()
{
boost::unique_lock<boost::mutex> lock(eventsMutex);
for (auto const & currentEvent : eventsQueue)
for(const auto & currentEvent : eventsQueue)
handleCurrentEvent(currentEvent);
eventsQueue.clear();
@@ -87,7 +87,7 @@ bool InputHandler::ignoreEventsUntilInput()
bool inputFound = false;
boost::unique_lock<boost::mutex> lock(eventsMutex);
for (auto const & event : eventsQueue)
for(const auto & event : eventsQueue)
{
switch(event.type)
{
@@ -226,7 +226,7 @@ void InputHandler::moveCursorPosition(const Point & distance)
void InputHandler::setCursorPosition(const Point & position)
{
cursorPosition = position;
GH.events().dispatchMouseMoved(position);
GH.events().dispatchMouseMoved(Point(0, 0), position);
}
void InputHandler::startTextInput(const Rect & where)