Class MiniConsole
A Mudlet text container that mimicks the main console.
self:Draw () |
Draws the MiniConsole. |
self:Resize (width, height) |
Changes the MiniConsole's size. |
self:Move (x, y) |
Moves the MiniConsole. |
self:Hide () |
Hides the MiniConsole. |
self:Show () |
Shows the MiniConsole. |
self:Echo (text) |
Displays text on a MiniConsole. |
self:HEcho (text) |
Displays text on a MiniConsole with Hex color formatting. |
self:CEcho (text) |
Displays text on a MiniConsole with colour tags. |
self:DEcho (text, foregroundColor, backgroundColor, useInsertText) |
Displays text on a MiniConsole with some crazy-ass formatting. |
self:EchoLink (text, command, tooltipText, keepFormat, useInsertText) |
Displays a clickable line of text in a MiniConsole. |
self:EchoPopup (text, commands, tooltipTexts, keepFormat, useInsertText) |
Clickable text that expands out to a menu. |
self:Paste () |
Copies text to the MiniConsole from the clipboard (via copy()). |
self:Append () |
Copies text to the MiniConsole from a buffer or the clipboard (via copy()). |
self:Clear () |
Clears all text from the MiniConsole |
-
self:Draw ()
-
Draws the MiniConsole.
Should only be called internally.
-
self:Resize (width, height)
-
Changes the MiniConsole's size.
Parameters:
- width
number
New width of the MiniConsole.
- height
number
New height of the MiniConsole.
-
self:Move (x, y)
-
Moves the MiniConsole.
Parameters:
- x
number
New relative X coordinate of the MiniConsole.
- y
number
New relative Y coordinate of the MiniConsole.
-
self:Hide ()
-
Hides the MiniConsole.
-
self:Show ()
-
Shows the MiniConsole.
-
self:Echo (text)
-
Displays text on a MiniConsole.
Starts where the last line left off.
Parameters:
-
self:HEcho (text)
-
Displays text on a MiniConsole with Hex color formatting.
Parameters:
-
self:CEcho (text)
-
Displays text on a MiniConsole with colour tags.
Parameters:
-
self:DEcho (text, foregroundColor, backgroundColor, useInsertText)
-
Displays text on a MiniConsole with some crazy-ass formatting.
Parameters:
- text
string
- foregroundColor
The foreground color of the text.
- backgroundColor
The background color of the text.
- useInsertText
bool
If true, uses InsertText() instead of echo().
-
self:EchoLink (text, command, tooltipText, keepFormat, useInsertText)
-
Displays a clickable line of text in a MiniConsole.
Parameters:
- text
string
- command
function or string
Script to be executed when clicked.
- tooltipText
string
- keepFormat
bool
If true, uses Frame text formatting.
- useInsertText
bool
If true, uses InsertText() instead of Echo()
-
self:EchoPopup (text, commands, tooltipTexts, keepFormat, useInsertText)
-
Clickable text that expands out to a menu.
Parameters:
- text
string
- commands
table
A table of scripts to be executed.
- tooltipTexts
table
A table of tooltips.
- keepFormat
bool
If true, uses MiniConsole text formatting.
- useInsertText
bool
If true, uses InsertText() instead of Echo()
-
self:Paste ()
-
Copies text to the MiniConsole from the clipboard (via copy()).
Clears the window first.
-
self:Append ()
-
Copies text to the MiniConsole from a buffer or the clipboard (via copy()).
Adds the text beginning at a new line.
-
self:Clear ()
-
Clears all text from the MiniConsole
-
MiniConsole:MiniConsole (_name[, initialX=0[, initialY=0[, initialWidth=1.0[, initialHeight=1.0[, initialWordWrap[, initialFontSize]]]]]])
-
MiniConsole constructor.
Parameters:
- _name
string
Used for echoing and other Mudlet referencing.
- initialX
number
X coordinate position.
(default 0)
- initialY
number
Y coordinate position.
(default 0)
- initialWidth
number
Width of the MiniConsole.
(default 1.0)
- initialHeight
number
Height of the MiniConsole.
(default 1.0)
- initialWordWrap
number or string
Sets the MiniConsole's word wrap in characters. Default is dynamic or 80
if initialFontSize is dynamic.
(optional)
- initialFontSize
number or string
Sets the MiniConsole's font size. Default is dynamic or 8 if
initialWordWrap is dynamic.
(optional)
Returns:
MiniConsole
-
self.Name.get ()
-
Returns the MiniConsole's name.
Returns:
string
-
self.Container.get ()
-
Returns the MiniConsole's parent Frame.
Returns:
Frame
-
self.Container.set (value)
-
Sets the MiniConsole's parent Frame.
Parameters:
-
self.X.get ()
-
Returns the MiniConsole's user-defined X coordinate.
Returns:
number
-
self.X.set (value)
-
Sets the MiniConsole's user-defined X coordinate.
Parameters:
-
self.AbsoluteX.get ()
-
Returns the MiniConsole's actual X coordinate.
Returns:
number
-
self.Y.get ()
-
Returns the MiniConsole's user-defined Y coordinate.
Returns:
number
-
self.Y.set (value)
-
Sets the MiniConsole's user-defined Y coordinate.
Parameters:
-
self.AbsoluteY.get ()
-
Returns the MiniConsole's actual Y coordinate.
Returns:
number
-
self.Width.get ()
-
Returns the MiniConsole's user-defined width.
Returns:
number
-
self.Width.set (value)
-
Sets the MiniConsole's user-defined width.
Parameters:
-
self.AbsoluteWidth.get ()
-
Returns the MiniConsole's actual width.
Returns:
number
-
self.Height.get ()
-
Returns the MiniConsole's user-defined height.
Returns:
number
-
self.Height.set (value)
-
Sets the MiniConsole's user-defined height.
Parameters:
-
self.AbsoluteHeight.get ()
-
Returns the MiniConsole's actual height.
Returns:
number
-
self.WordWrap.get ()
-
Returns the MiniConsole's word wrap.
Returns:
number or string
-
self.WordWrap.set (value)
-
Sets the MiniConsole's word wrap.
Parameters:
- value
number or string
Only acceptable string is "dynamic".
-
self.AbsoluteWrap.get ()
-
Returns the MiniConsole's actual word wrap.
Returns:
number
-
self.FontSize.get ()
-
Returns the MiniConsole's font size.
Returns:
number or string
-
self.FontSize.set (value)
-
Sets the MiniConsole's font size.
Parameters:
- value
number or string
Only acceptable string is "dynamic".
-
self.AbsoluteSize.get ()
-
Returns the MiniConsole's actual font size.
Returns:
number