I recently started project in java using the JSFML
library. My code fragment looks like this:
Iterable<Event> events;
events = mRenderWindow.pollEvents();
mKeyboardListener.handleEvents(events);
mMouseListener.handleEvents(events);
My problem is, when I firstly use KeyboardListener
, then MouseListener
is not working and vice versa. Can someone explain this behaviour? I searched for some info and there is not enough explanation.