fix splash state not getting inputs

This commit is contained in:
yugecin
2017-05-28 11:46:31 +02:00
parent 419ffd3d26
commit 2deef7c3a9
2 changed files with 7 additions and 2 deletions

View File

@@ -148,8 +148,10 @@ public class Input {
* @param listener The listener to be notified * @param listener The listener to be notified
*/ */
public void addKeyListener(KeyListener listener) { public void addKeyListener(KeyListener listener) {
if (!keyListeners.contains(listener)) {
keyListeners.add(listener); keyListeners.add(listener);
} }
}
/** /**
* Add a mouse listener to be notified of mouse input events * Add a mouse listener to be notified of mouse input events
@@ -157,8 +159,10 @@ public class Input {
* @param listener The listener to be notified * @param listener The listener to be notified
*/ */
public void addMouseListener(MouseListener listener) { public void addMouseListener(MouseListener listener) {
if (!mouseListeners.contains(listener)) {
mouseListeners.add(listener); mouseListeners.add(listener);
} }
}
/** /**
* Remove all the listeners from this input * Remove all the listeners from this input

View File

@@ -440,6 +440,7 @@ public class DisplayContainer implements ErrorDumpable, ResolutionChangedListene
input.addListener(new GlobalInputListener()); input.addListener(new GlobalInputListener());
input.addMouseListener(bubNotifState); input.addMouseListener(bubNotifState);
} }
input.addListener(state);
sout("GL ready"); sout("GL ready");