Skip to content

Instantly share code, notes, and snippets.

@Busata
Last active August 29, 2015 14:16
Show Gist options
  • Save Busata/5671eb19a942f3e269e5 to your computer and use it in GitHub Desktop.
Save Busata/5671eb19a942f3e269e5 to your computer and use it in GitHub Desktop.
Without:
this.actionManager.registerAction(Input.Keys.F1,new Command() {
@Override
public void execute() {
System.out.println(isMenuShown);
}
});
With lambdas:
this.actionManager.registerAction(Input.Keys.F1, () -> System.out.println(isMenuShown));
With parameters & body
this.actionManager.registerAction(Input.Keys.F1, (foo, bar) -> {
System.out.println(foo);
System.out.println(bar);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment