AskNumberPopup
Simple class for showing a prompt for a positive integer 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
Buttons that when clicked will add/subtract these amounts to the number
The bounds in which the number must lie. Defaults to Int.MIN_VALUE, Int.MAX_VALUE
Text that will be shown when an error is detected
Function that should return true
when a valid input is detected
Lambda that will be executed after pressing 'OK'.
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.