> For the complete documentation index, see [llms.txt](https://tanishisherewith.gitbook.io/archived-legacy-dynamichud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tanishisherewith.gitbook.io/archived-legacy-dynamichud/contextmenu/datainputscreen.md).

# DataInputScreen

This page talks about DataInputScreen class

## DataInputScreen

The [`DataInputScreen`](https://github.com/V-Fast/DynamicHUD/blob/master/src/main/java/com/tanishisherewith/dynamichud/util/contextmenu/DataInputScreen.java) class extends the `Screen` class and represents a screen that allows the user to enter a String value.

## Fields

* `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.

## Constructors

* `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.

## Methods

* `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.
