input display toggleable with i key

This commit is contained in:
Antoine
2021-06-25 18:38:22 +02:00
parent 3799a7549b
commit 2000ac6a30
2 changed files with 19 additions and 4 deletions

View File

@ -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;
}
}
}