Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix logic and temporary insanity

  • Loading branch information...
commit c9eaf4b53475ab588aa54cdbecc073c03cec64d8 1 parent 443c230
vilarion vilarion authored
10 nifty-renderer-slick/src/main/java/de/lessvoid/nifty/slick2d/input/AbstractSlickInputSystem.java
View
@@ -79,17 +79,19 @@ public final void forwardEvents(final NiftyInputConsumer inputEventConsumer) {
continue;
}
- boolean isForwarded = currentEvent.isForwarded(forwardMode);
+ final boolean isForwarded = currentEvent.isForwarded(forwardMode);
if (!isForwarded && currentEvent.sendToNifty(inputEventConsumer)) {
currentEvent.updateState(inputState, true);
} else {
handleInputEvent(currentEvent);
- // Forwarding might just have been disabled, if that is the case Nifty needs to know about the event
- if (!isForwarded && currentEvent.isForwarded(forwardMode)) {
+ // Forwarding might just have been enabled again, if that is the case Nifty needs to know about the event
+ if (isForwarded && !currentEvent.isForwarded(forwardMode)) {
currentEvent.sendToNifty(inputEventConsumer);
+ currentEvent.updateState(inputState, true);
+ } else {
+ currentEvent.updateState(inputState, false);
}
- currentEvent.updateState(inputState, false);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.