Skip to content

Commit

Permalink
Added onEndScreen() method to Controller class since it had already o…
Browse files Browse the repository at this point in the history
…nStartScreen()
  • Loading branch information
BorealFeast committed Oct 29, 2015
1 parent 4c5c990 commit ae267e1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,9 @@ public void layoutCallback() {
public boolean isBound() {
return bound;
}

@Override
public void onEndScreen() {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,9 @@ void bind(
* @return true, the event has been handled and false, the event has not been handled
*/
boolean inputEvent(@Nonnull NiftyInputEvent inputEvent);

/**
* Called when the screen ended.
*/
void onEndScreen();
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ public boolean inputEvent(@Nonnull final NiftyInputEvent inputEvent) {
@Override
public void onFocus(final boolean getFocus) {
}
}

@Override
public void onEndScreen() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void onStartScreen(@Nonnull final Nifty nifty, @Nonnull final Screen scre
}

public void onEndScreen(@Nonnull final Nifty nifty, @Nonnull final Screen screen, @Nullable final String elementId) {
controller.onEndScreen();
nifty.unsubscribeAnnotations(controller);
if (elementId != null) {
nifty.unsubscribeElement(screen, elementId);
Expand Down

0 comments on commit ae267e1

Please sign in to comment.