DoubleInputScreen
This page talks about DoubleInputScreen class
DoubleInputScreen
The DoubleInputScreen class extends the Screen class and represents a screen that allows the user to enter a double value.
Fields
consumer: The consumer that accepts the entered double value.textField: The text field widget for entering the double value.x,y: The position of the text field widget.parentScreen: The parent screen of this screen.doubleInputOption: The double input option associated with this screen.
Constructors
DoubleInputScreen(Consumer<Double> consumer, int x, int y, Screen parentScreen, ContextMenu.DoubleInputOption doubleInputOption): Constructs a DoubleInputScreen object with the given consumer, position, parent screen and double input option.
Methods
init(): Initializes this screen by creating a text field widget for entering the double value.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.