Browse files

Fix logic and temporary insanity

  • Loading branch information...
1 parent 443c230 commit c9eaf4b53475ab588aa54cdbecc073c03cec64d8 @vilarion vilarion committed Nov 19, 2012
View
10 ...enderer-slick/src/main/java/de/lessvoid/nifty/slick2d/input/AbstractSlickInputSystem.java
@@ -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);
}
}
}

0 comments on commit c9eaf4b

Please sign in to comment.