Constructor
new Extended(columns, rows, colorOfBorder, options)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
columns |
Array.<number> | the sizes of the columns | |||||||||
rows |
Array.<number> | the sizes of the rows | |||||||||
colorOfBorder |
string | the color to make the border, see color_codes.txt for more info | |||||||||
options |
Object | options for the instance
Properties
|
Extends
Members
(static) emitter
The input emitter for enableInput
- Source:
- See:
(static) menuCore
Get the menuCore class
(static) multiline
Get the Multiline class
(static) textStore
Same as multiline
Methods
(static) highlight(text) → {string}
Highlight a piece of text
Parameters:
Name | Type | Description |
---|---|---|
text |
string | the text to highlight |
Returns:
- the highlighted text
- Type
- string
(static) underline(text) → {string}
Underline a piece of text
Parameters:
Name | Type | Description |
---|---|---|
text |
string | the text to underline |
Returns:
- the underlined text
- Type
- string
c()
Same as container
- Overrides:
- Source:
- See:
clearAll()
Clear all containers
- Overrides:
- Source:
container(y, x) → {Container}
Get the container at the specified coordinates
Parameters:
Name | Type | Description |
---|---|---|
y |
number | the container y position |
x |
number | the container x position |
- Overrides:
- Source:
Returns:
- the container
- Type
- Container
createKeybind()
Incomplete function, for creating keybinds
drawBorders()
Internal function called for drawing the main borders.
- Overrides:
- Source:
enableInput() → {module:events.EventEmitter.EventEmitter}
Enables input processing for input, returns an event emitter
Returns:
- Type
- module:events.EventEmitter.EventEmitter
exit()
Exits the process
Same as process.exit() but with correct formatting
- Overrides:
- Source:
gotoEnd()
Internally used function, moves cursor to bottom of console
- Overrides:
- Source:
pipeInput(containerY, containerX)
Write all registered keypress events to this container, and clear on newline
Requires enableInput to be called first
Parameters:
Name | Type | Description |
---|---|---|
containerY |
number | the y coordinate of the target container |
containerX |
number | the x coordinate of the target container |
- Source:
- See:
setupExit()
Internally used function for setting up exit handling
- Overrides:
- Source:
Events
line
An event spitting out a whole line of text, on newline
Properties:
Name | Type | Description |
---|---|---|
data |
string | the string that was captured |
- Source:
- See:
raw
An event that is emitted on every keypress,
returns an keypress Object
Properties:
Name | Type | Description |
---|---|---|
key |
keypress | the key that was pressed |
- Source:
- See: