fix splash state not getting inputs
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user