Package com.misc
Class StringInputListener
- java.lang.Object
-
- com.misc.StringInputListener
-
- All Implemented Interfaces:
com.badlogic.gdx.Input.TextInputListener
public class StringInputListener extends java.lang.Object implements com.badlogic.gdx.Input.TextInputListenerA class to produce a popup allowing the player to enter a string for the save name.- Since:
- 24/04/2020
-
-
Constructor Summary
Constructors Constructor Description StringInputListener(SaveControls saveControls, com.badlogic.gdx.scenes.scene2d.ui.TextButton button, int saveNumber)The contructor of the input listener, gathers information that it can be called when the player has finished entering a string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcanceled()Called if the player cancel's editingvoidinput(java.lang.String text)Called when the player finishes editing
-
-
-
Constructor Detail
-
StringInputListener
public StringInputListener(SaveControls saveControls, com.badlogic.gdx.scenes.scene2d.ui.TextButton button, int saveNumber)
The contructor of the input listener, gathers information that it can be called when the player has finished entering a string- Parameters:
saveControls- The save controls needed to change the save file namebutton- The button's text with the player's inputsaveNumber- The save number that is being modified
-
-
Method Detail
-
input
public void input(java.lang.String text)
Called when the player finishes editing- Specified by:
inputin interfacecom.badlogic.gdx.Input.TextInputListener- Parameters:
text- The string the player wrote
-
canceled
public void canceled()
Called if the player cancel's editing- Specified by:
canceledin interfacecom.badlogic.gdx.Input.TextInputListener
-
-