LineReader
The LineReader class contains settings for reading out command lines as well as the current state of the line input.
Flags
Certain options can be selected when reading the lines:
Flag (byte) | Description |
---|---|
(0x01) FLAG_INSERT_MODE | All characters to the right of the text cursor are moved to the right when they are entered. |
(0x02) FLAG_ECHO_MODE | When entering the line value, all characters are displayed. |
(0x04) FLAG_QUICK_DELETE | Pressing the Backspace key deletes the entire line. |
(0x08) FLAG_KEEP_LINE | When the Enter key is pressed, the line entered remains visible. |
(0x10) FLAG_NAVIGABLE_CURSOR | The text cursor can be moved freely within the line using the arrow keys. |
Default flags: FLAG_INSERT_MODE
, FLAG_ECHO_MODE
, FLAG_KEEP_LINE
, FLAG_NAVIGABLE_CURSOR
Input History
The input history saves all lines and these can be called up using the up/down arrow keys. to call them up.
TabCompleter
The TabCompleter specifies strings at certain positions. These suggestions can be called up using the tabulator key.
Read lines
There are several ways to read lines:
Line Renderer
There are ways to change the display of the command line. Prefixes are often used in the command line, which are displayed on the left-hand side of the line. To add your own, the following setting must be made: