Methods
active()
Move to cursor to 0,0 of this container
- Source:
append(data)
This makes the container act like a new console.
New strings will always be appended to the bottom of the container, and old ones will be moved up.
Parameters:
Name | Type | Description |
---|---|---|
data |
string | the string to append |
- Source:
clear()
Same as clearContainer
- Source:
- See:
clearContainer()
Clears the whole container
- Source:
clearWrite(text)
Clear the container and then write text at 0,0
Parameters:
Name | Type | Description |
---|---|---|
text |
string | the text to write |
- Source:
cLoc(x, y)
change location of cursor relative to container
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x value |
y |
number | the y value |
- Source:
cNL()
Acts as a newline inside the container
- Source:
createPadding(options)
Update the padding of the container later on
Parameters:
Name | Type | Description |
---|---|---|
options |
paddingOptions | the new padding for the container |
- Source:
setTextAtLine(line, data)
Writes text at a specific line, same as writing at that x value
Parameters:
Name | Type | Description |
---|---|---|
line |
number | the line to write at |
data |
string | the string to write at that line |
- Source:
setTextByArray(array, bind_to_bottomopt)
Sets the content to the content of an array
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
array |
Array.<string> | the array | ||
bind_to_bottom |
boolean |
<optional> |
false | If content should be aligned to bottom of screen |
- Source:
setTitle()
Same as writeTitle
- Source:
- See:
write(data)
Writes text at the current position of the cursor in that container.
Parameters:
Name | Type | Description |
---|---|---|
data |
string | the data to write |
- Source:
writeAt(x, y, data)
Write text at a specific position
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x location |
y |
number | y location |
data |
string | the string to write |
- Source:
writeTitle(text, offsetopt)
Change the title of the container. Warning: if changed multiple times it will leaves holes in the border.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string | the text to change it to | ||
offset |
number |
<optional> |
2 | how far to offset the title from the edge, usually best to leave at default. |
- Source: