ok, finally think I'm making some progress! thanks for your help.
I used your override method, but put in a pause/resume before/after the consumeEvent. That seems to be working:
Code:
@Override
public void mousePressed(int button, int x, int y) {
if (gui.handleMouse(x, y, button, true)) {
input.pause();
input.consumeEvent();
input.resume();
}
}
edit: Seems to only work for mouse though, still need to figure out the keyboard events now.
edit2:
A little bit closer. This works with keyboard *if* the slick calls is:
input.isKeyPressed
If I use:
input.isKeyDown
it doesn't consume the event (even if it's just a quick tap on the keyboard). I think I need to handleRepeatKeys or such?
Example (in Slick update()):
Code:
if (input.isKeyDown(Input.KEY_A)) {
owner.moveLeft(delta);
}
doesn't work with the pause/consume/resume.
This *does* work though:
Code:
if (input.isKeyPressed(Input.KEY_A)) {
owner.moveLeft(delta);
}
Unfortunately I don't see a KeyDown method that I can override:
http://slick.cokeandcode.com/javadoc/or ... apter.html
Any other way this could be dealt with?