InputBox - Grisgram/gml-raptor GitHub Wiki

You are here:

Base Controls - Containers - Tooltips - Clickables - Checkables - ListBox - ✔InputBox - Mouse Cursor - ControlTree


InputBox

This is a text box control allowing the user to input data.
It extends the Clickable Controls by these additional Variable Definitions:

image

text_color_focus
border_color_focus
Text and Border color to use while this InputBox has the focus, defaulted through UI Themes
select_all_on_focus If true, all text will be selected, when the InputBox receives focus
on_text_changed Callback to invoke, when the text changes
on_got_focus Callback to invoke, when it receives focus
on_lost_focus Callback to invoke, when it loses focus
max_length Maximum number characters that can be entered
tab_index The InputBox reacts to the Tab key to jump forward to the next control and also on Shift-Tab to jump backwards to the previous control. The tab_index defines the order for these jumps.
If you leave the value at -1, a tab index is chosen automatically based on the number of InputBoxes in the room, so they will tab through in the order they are created. Set any value of zero or greater to force a specific tab index
password_char A character to replace entered characters for password input
input_filter Three possible values:
none: unrestricted,
allowed: only characters in filtered_characters will be accepted. This way, you can easily create numeric-only InputBoxes
forbidden: The characters in filtered_characters will be ignored. Good for entering names or things, that might result in a filename, to disallow backslash, colon and other critical characters
filtered_characters A string containing all the allowed/forbidden characters. This setting is ignored, if input_filter is set to none

Supported keys and shortcuts

The UX of the InputBox is quite comfortable and comes with these features:

Action Description
Home, End Jump to the start / end of the string
Backspace, Delete Work as you know them from Windows
Cursor keys Move the cursor.
Ctrl+Cursor Keys jumps word-wise
Shift+Cursor Keys Selects Text
Ctrl+Shift+Cursor Keys Selects Text word-wise
Mouse Click Position the Cursor
Click & Drag Select text with mouse
Ctrl-A Select all
Ctrl-X
Ctrl-C
Ctrl-V
Standard cut/copy/paste functionality
Shift+Delete (Cut)
Ctrl+Insert (Copy)
Shift+Insert (Paste)
Even the extended cut/copy/paste operations are supported
Tab
Shift+Tab
Jump to the next/previous InputBox

Important

If text is pasted to the InputBox with Ctrl-V or Shift-Insert, it checks the length and cuts the text if it contains more characters than allowed according to max_length.


You are here:

Base Controls - Containers - Tooltips - Clickables - Checkables - ListBox - ✔InputBox - Mouse Cursor - ControlTree

⚠️ **GitHub.com Fallback** ⚠️