Skip to content

Commit

Permalink
Primitive consumers
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRamenChef committed May 30, 2019
1 parent 3d41a91 commit d8236a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/de/gurkenlabs/litiengine/gui/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Consumer;
import java.util.function.IntConsumer;

import de.gurkenlabs.litiengine.graphics.Spritesheet;

Expand All @@ -14,7 +14,7 @@ public class Menu extends ImageComponentList {
private int currentSelection;
/** The menu buttons. */
private final String[] items;
private final List<Consumer<Integer>> selectionChangeConsumers;
private final List<IntConsumer> selectionChangeConsumers;

public Menu(final double x, final double y, final double width, final double height, final String... items) {
this(x, y, width, height, null, items);
Expand All @@ -30,7 +30,7 @@ public int getCurrentSelection() {
return this.currentSelection;
}

public void onChange(final Consumer<Integer> cons) {
public void onChange(final IntConsumer cons) {
this.selectionChangeConsumers.add(cons);
}

Expand Down

0 comments on commit d8236a9

Please sign in to comment.