AskTextPopup
Simple class for showing a prompt for a string to the user
Parameters
The previous screen the user was on
A line of text shown to the user
Icon at the top, should have size 80f
The text that should be in the prompt at the start
Text that will be shown when an error is detected
The maximal amount of characters the user may input
Function that should return true
when a valid input is entered, false otherwise
Lambda that will be executed after pressing 'OK'. Gets the text the user inputted as a parameter.
Constructors
Functions
Adds a TextButton and ends the current row.
Adds an inline TextButton.
Adds a TextButton that closes the popup, with BACK already mapped.
Adds a TextButton that can close the popup, with RETURN already mapped.
The last two additions must be buttons. Make their width equal by setting minWidth of one cell to actor width of the other.
Subroutine for open handles only visibility and keyPressDispatcher
Properties
Sets or retrieves the Actor that currently has keyboard focus.
The KeyPressDispatcher for the popup - Key handlers from the parent screen are inactive while the popup is active through the hasOpenPopups mechanism.