User Inputs

Most times, the user needs to interact with the UI, and maybe check settings, or type in numbers or text. There are a number of helper classes to accommodate this need.

Buttons

Buttons are the easiest type of interaction: just a click is needed. There are two basic classes for buttons: TextButton and ImageButton. The TextButton is just a restyled TextPanel with a click listener. The ImageButton takes a FileReference as a source, and then draws the image.

Check Boxes

There is a Checkbox class that draws the checkbox. If you want a title for it, use the BooleanInput class.

Text Input

For text input, there are two classes, depending on whether you need multi-line input: TextInput and TextInputML (ML = multi-line). A specialty with Rem's Engine is its integrated spellchecker. By default, all text inputs will spellcheck your entered values. This can be disabled with enableSpellcheck=false. The logic for that is implemented in CorrectingTextInput.

Closely related to text inputs are number inputs and file inputs. FileInput is the class for files.

Number Inputs

Number inputs will parse the entered value, and offer dragging to increase/decrease the value smoothly. There are two types: IntInput for whole numbers and FloatInput for floating point numbers.

Vector Inputs

Rem's Engine has an editor mode, so there is input panels for vectors as well: IntVectorInput and FloatVectorInput. If your value is a color, use a ColorInput instead. A trick for HDR colors is to use the alpha input as the logarithmic brightness.

Created: 14:26, 26. Mar 2023; Most recent change: 08:30, 19. Sep 2023