Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Make the cursor listener pass through
Browse files Browse the repository at this point in the history
We only need to collect data, we do not need to do anything, so we
pass through the next listener, even if it is a GUI one, because when
we go out of the GUI, the cursor values will normalize again.
  • Loading branch information
arthurmco committed Feb 25, 2020
1 parent f1dde91 commit 1cb7581
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client/input/Cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ Cursor::Cursor()

_x = event.screenX;
_y = event.screenY;

return true;

// We received the event, but we also want the event to pass through normally
// so we return false anyway
}

return false;
};

input::InputService::getInputManager()->addListenerHandler(_listener);
input::InputService::getInputManager()->addListenerHandler(_listener, 20);

// InputManager::GetInstance()->AddListener(EVENT_MOUSEMOVE, _listener,
// 0.01);
Expand Down

0 comments on commit 1cb7581

Please sign in to comment.