DataInputScreen
This page talks about DataInputScreen class
This page talks about DataInputScreen class
The class extends the Screen
class and represents a screen that allows the user to enter a String value.
consumer
: The consumer that accepts the entered data.
textField
: The text field widget for entering data.
x
, y
: The position of the text field widget.
parentScreen
: The parent screen of this screen.
DataInputOption
: The data input option associated with this screen.
DataInputScreen(Consumer<String> consumer, int x, int y, Screen parentScreen, ContextMenu.DataInputOption dataInputOption)
: Constructs a DataInputScreen object with the given consumer, position, parent screen and data input option.
init()
: Initializes this screen by creating a text field widget for entering data.
keyPressed(int keyCode, int scanCode, int modifiers)
: Handles key presses on this screen. Closes the screen and passes the entered data to the consumer when the Enter key is pressed.
shouldPause()
: Returns whether this screen should pause the game.