input display toggleable with i key
This commit is contained in:
@ -123,7 +123,7 @@ public class match {
|
||||
objP1.getShadow().translate(new Vector3f(0f,p1.getPosY(),0));
|
||||
objP2.getShadow().translate(new Vector3f(0f,p2.getPosY(),0));
|
||||
// Crée l'InputList
|
||||
if(showInputListP1){
|
||||
if (showInputListP1){
|
||||
inputListP1 = new UIInputList(inputsP1, 10f, 0f, 0.85f, 110f, engine);
|
||||
engine.add_uiElement(inputListP1);
|
||||
inputListP1.init();
|
||||
@ -150,7 +150,7 @@ public class match {
|
||||
}
|
||||
|
||||
engine.remove_uiElement(matchWon);
|
||||
if(showInputListP1){
|
||||
if(inputListP1 != null){
|
||||
engine.remove_uiElement(inputListP1);
|
||||
}
|
||||
|
||||
@ -963,4 +963,18 @@ public class match {
|
||||
}
|
||||
}
|
||||
|
||||
public static void inputP1Toggle(){
|
||||
if (showInputListP1){
|
||||
if (inputListP1 != null){
|
||||
engine.remove_uiElement(inputListP1);
|
||||
}
|
||||
showInputListP1 = false;
|
||||
} else {
|
||||
inputListP1 = new UIInputList(inputsP1, 10f, 0f, 0.85f, 110f, engine);
|
||||
engine.add_uiElement(inputListP1);
|
||||
inputListP1.init();
|
||||
showInputListP1 = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user