Module EMCO
Embeddable Multi Console Object.
This is essentially YATCO, but with some tweaks, updates, and it returns an object similar to Geyser so that you can a.) have multiple of them and b.) easily embed it into your existing UI as you would any other Geyser element.
Functions
miniConvertYATCO () | Scans for the old YATCO configuration values and prints out a set of constraints to use. |
convertYATCO () | Echos to the main console a script object you can add which will fully convert YATCO to EMCO. |
addTab (tabName[, position]) | Adds a tab to the EMCO object |
reset () | resets the object, redrawing everything |
fuzzyBoolean (bool) | Expands boolean definitions to be more flexible. |
clear (tabName) | clears a specific tab |
clearAll () | clears all the tabs |
setTabFont (font) | sets the font for all tabs |
setSingleTabFont (tabName, font) | sets the font for a single tab. |
setFont (font) | sets the font for all the miniconsoles |
setSingleWindowFont (tabName, font) | sets the font for a specific miniconsole. |
enableCustomTimestampColor () | enables custom colors for the timestamp, if displayed |
disableCustomTimestampColor () | disables custom colors for the timestamp, if displayed |
enableTimestamp () | enables the display of timestamps |
disableTimestamp () | disables the display of timestamps |
setTimestampFormat (format) | Sets the formatting for the timestamp, if enabled |
setTimestampBGColor (color) | Sets the background color for the timestamp, if customTimestampColor is enabled. |
setTimestampFGColor (color) | Sets the foreground color for the timestamp, if customTimestampColor is enabled. |
setAllTabName (allTabName) | Sets the 'all' tab name. |
enableAllTab () | Enables use of the 'all' tab |
disableAllTab () | Disables use of the 'all' tab |
enableMapTab () | Enables tying the Mudlet Mapper to one of the tabs. |
disableMapTab () | disables binding the Mudlet Mapper to one of the tabs. |
setMapTabName (mapTabName) | sets the name of the tab to bind the Mudlet Map. |
enableBlinkFromAll () | Enables tab blinking even if you're on the 'all' tab |
disableBlinkFromAll () | Disables tab blinking when you're on the 'all' tab |
enableGag () | Enables gagging of the line passed in to :append(tabName) |
disableGag () | Disables gagging of the line passed in to :append(tabName) |
enableBlink () | Enables tab blinking when new information comes in to an inactive tab |
disableBlink () | Disables tab blinking when new information comes in to an inactive tab |
enablePreserveBackground () | Enables preserving the chat's background over the background of an incoming :append() |
disablePreserveBackground () | Enables preserving the chat's background over the background of an incoming :append() |
setBlinkTime (blinkTime) | Sets how long in seconds to wait between blinks |
setFontSize (fontSize) | Sets the font size of the attached consoles |
setActiveTabFGColor (color) | Sets the FG color for the active tab |
setInactiveTabFGColor (color) | Sets the FG color for the inactive tab |
setActiveTabBGColor (color) | Sets the BG color for the active tab. |
setInactiveTabBGColor (color) | Sets the BG color for the inactive tab. |
setConsoleColor (color) | Sets the BG color for the consoles attached to this object |
setTabBoxCSS (css) | Sets the CSS to use for the tab box which contains the tabs for the object |
setTabBoxColor (color) | Sets the color to use for the tab box background |
setConsoleContainerColor (color) | Sets the color for the container which holds the consoles attached to this object. |
setConsoleContainerCSS (css) | Sets the CSS to use for the container which holds the consoles attached to this object |
setGap (gap) | Sets the amount of space to use between the tabs and the consoles |
setTabHeight (tabHeight) | Sets the height of the tabs in pixels |
enableAutoWrap () | Enables autowrap for the object, and by extension all attached consoles. |
disableAutoWrap () | Disables autowrap for the object, and by extension all attached consoles. |
setWrap (wrapAt) | Sets the number of characters to wordwrap the attached consoles at. |
append (tabName, excludeAll) | Appends the current line from the MUD to a tab. |
cecho (tabName, message, excludeAll) | cecho to a tab, maintaining functionality |
decho (tabName, message, excludeAll) | decho to a tab, maintaining functionality |
hecho (tabName, message, excludeAll) | hecho to a tab, maintaining functionality |
echo (tabName, message, excludeAll) | echo to a tab, maintaining functionality |
cechoLink (tabName, text, command, hint, excludeAll) | cechoLink to a tab |
dechoLink (tabName, text, command, hint, excludeAll) | dechoLink to a tab |
hechoLink (tabName, text, command, hint, excludeAll) | hechoLink to a tab |
echoLink (tabName, text, command, hint, useCurrentFormat, excludeAll) | echoLink to a tab |
cechoPopup (tabName, text, commands, hints, excludeAll) | cechoPopup to a tab |
dechoPopup (tabName, text, commands, hints, excludeAll) | dechoPopup to a tab |
hechoPopup (tabName, text, commands, hints, excludeAll) | hechoPopup to a tab |
echoPopup (tabName, text, commands, hints, useCurrentFormat, excludeAll) | echoPopup to a tab |
addAllTabExclusion (tabName) | adds a tab to the exclusion list for echoing to the allTab |
removeAllTabExclusion (tabName) | removess a tab from the exclusion list for echoing to the allTab |
enableBlankLine () | Enable placing a blank line between all messages. |
disableBlankLine () | Enable placing a blank line between all messages. |
enableScrollbars () | Enable scrollbars for the miniconsoles |
disableScrollbars () | Disable scrollbars for the miniconsoles |
new (cons, container) | Creates a new Embeddable Multi Console Object. |
Functions
- miniConvertYATCO ()
- Scans for the old YATCO configuration values and prints out a set of constraints to use. with EMCO to achieve the same effect. Is just the invocation
- convertYATCO ()
- Echos to the main console a script object you can add which will fully convert YATCO to EMCO. This replaces the demonnic.chat variable with a newly created EMCO object, so that the main functions used to place information on the consoles (append(), cecho(), etc) should continue to work in the user's triggers and events.
- addTab (tabName[, position])
-
Adds a tab to the EMCO object
Parameters:
- tabName string the name of the tab to add
- position number position in the tab switcher to put this tab (optional)
- reset ()
- resets the object, redrawing everything
- fuzzyBoolean (bool)
-
Expands boolean definitions to be more flexible.
True values are "true", "yes", "0", 0, and true
False values are "false", "no", "1", 1, false, and nilParameters:
- bool item to test for truthiness
- clear (tabName)
-
clears a specific tab
Parameters:
- tabName string the name of the tab to clear
- clearAll ()
- clears all the tabs
- setTabFont (font)
-
sets the font for all tabs
Parameters:
- font string the font to use.
- setSingleTabFont (tabName, font)
-
sets the font for a single tab. If you use setTabFont this will be overridden
Parameters:
- setFont (font)
-
sets the font for all the miniconsoles
Parameters:
- font string the name of the font to use
- setSingleWindowFont (tabName, font)
-
sets the font for a specific miniconsole. If setFont is called this will be overridden
Parameters:
- enableCustomTimestampColor ()
- enables custom colors for the timestamp, if displayed
- disableCustomTimestampColor ()
- disables custom colors for the timestamp, if displayed
- enableTimestamp ()
- enables the display of timestamps
- disableTimestamp ()
- disables the display of timestamps
- setTimestampFormat (format)
-
Sets the formatting for the timestamp, if enabled
Parameters:
- format string Format string which describes the display of the timestamp. See: https://wiki.mudlet.org/w/Manual:Lua_Functions#getTime
- setTimestampBGColor (color)
-
Sets the background color for the timestamp, if customTimestampColor is enabled.
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setTimestampFGColor (color)
-
Sets the foreground color for the timestamp, if customTimestampColor is enabled.
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setAllTabName (allTabName)
-
Sets the 'all' tab name.
This is the name of the tab itselfParameters:
- allTabName string name of the tab to use as the all tab. Must be a tab which exists in the object.
- enableAllTab ()
- Enables use of the 'all' tab
- disableAllTab ()
- Disables use of the 'all' tab
- enableMapTab ()
-
Enables tying the Mudlet Mapper to one of the tabs.
mapTabName must be set, or this will error. Forces a redraw of the entire object - disableMapTab ()
-
disables binding the Mudlet Mapper to one of the tabs.
CAUTION: this may have unexpected behaviour, as you can only open one Mapper console per profile so you can't really unbind it. Binding of the Mudlet Mapper is best decided at instantiation. - setMapTabName (mapTabName)
-
sets the name of the tab to bind the Mudlet Map.
Forces a redraw of the object
CAUTION: Mudlet only allows one Map object to be open at one time, so if you are going to attach the map to an object you should probably do it at instantiation.Parameters:
- mapTabName string name of the tab to connect the Mudlet Map to.
- enableBlinkFromAll ()
- Enables tab blinking even if you're on the 'all' tab
- disableBlinkFromAll ()
- Disables tab blinking when you're on the 'all' tab
- enableGag ()
- Enables gagging of the line passed in to :append(tabName)
- disableGag ()
- Disables gagging of the line passed in to :append(tabName)
- enableBlink ()
- Enables tab blinking when new information comes in to an inactive tab
- disableBlink ()
- Disables tab blinking when new information comes in to an inactive tab
- enablePreserveBackground ()
- Enables preserving the chat's background over the background of an incoming :append()
- disablePreserveBackground ()
- Enables preserving the chat's background over the background of an incoming :append()
- setBlinkTime (blinkTime)
-
Sets how long in seconds to wait between blinks
Parameters:
- blinkTime number time in seconds to wait between blinks
- setFontSize (fontSize)
-
Sets the font size of the attached consoles
Parameters:
- fontSize number font size for attached consoles
- setActiveTabFGColor (color)
-
Sets the FG color for the active tab
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setInactiveTabFGColor (color)
-
Sets the FG color for the inactive tab
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setActiveTabBGColor (color)
-
Sets the BG color for the active tab.
NOTE: If you set CSS for the active tab, it will override this setting.Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setInactiveTabBGColor (color)
-
Sets the BG color for the inactive tab.
NOTE: If you set CSS for the inactive tab, it will override this setting.Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setConsoleColor (color)
-
Sets the BG color for the consoles attached to this object
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setTabBoxCSS (css)
-
Sets the CSS to use for the tab box which contains the tabs for the object
Parameters:
- css string The css styling to use for the tab box
- setTabBoxColor (color)
-
Sets the color to use for the tab box background
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setConsoleContainerColor (color)
-
Sets the color for the container which holds the consoles attached to this object.
Parameters:
- color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
- setConsoleContainerCSS (css)
-
Sets the CSS to use for the container which holds the consoles attached to this object
Parameters:
- css string CSS to use for the container
- setGap (gap)
-
Sets the amount of space to use between the tabs and the consoles
Parameters:
- gap number Number of pixels to keep between the tabs and consoles
- setTabHeight (tabHeight)
-
Sets the height of the tabs in pixels
Parameters:
- tabHeight number the height of the tabs for the object, in pixels
- enableAutoWrap ()
-
Enables autowrap for the object, and by extension all attached consoles.
To enable autoWrap for a specific miniconsole only, call myEMCO.windows[tabName]:enableAutoWrap() but be warned if you do this it may be overwritten by future calls to EMCO:enableAutoWrap() or :disableAutoWrap() - disableAutoWrap ()
-
Disables autowrap for the object, and by extension all attached consoles.
To disable autoWrap for a specific miniconsole only, call myEMCO.windows[tabName]:disableAutoWrap() but be warned if you do this it may be overwritten by future calls to EMCO:enableAutoWrap() or :disableAutoWrap() - setWrap (wrapAt)
-
Sets the number of characters to wordwrap the attached consoles at.
it is generally recommended to make use of autoWrap unless you need a specific width for some reasonParameters:
- wrapAt
- append (tabName, excludeAll)
-
Appends the current line from the MUD to a tab.
depending on this object's configuration, may gag the line
depending on this object's configuration, may gag the next promptParameters:
- tabName string The name of the tab to append the line to
- excludeAll boolean if true, will exclude this from being mirrored to the allTab
- cecho (tabName, message, excludeAll)
-
cecho to a tab, maintaining functionality
Parameters:
- decho (tabName, message, excludeAll)
-
decho to a tab, maintaining functionality
Parameters:
- hecho (tabName, message, excludeAll)
-
hecho to a tab, maintaining functionality
Parameters:
- echo (tabName, message, excludeAll)
-
echo to a tab, maintaining functionality
Parameters:
- cechoLink (tabName, text, command, hint, excludeAll)
-
cechoLink to a tab
Parameters:
- dechoLink (tabName, text, command, hint, excludeAll)
-
dechoLink to a tab
Parameters:
- hechoLink (tabName, text, command, hint, excludeAll)
-
hechoLink to a tab
Parameters:
- echoLink (tabName, text, command, hint, useCurrentFormat, excludeAll)
-
echoLink to a tab
Parameters:
- tabName string the name of the tab to echoLink to
- text string the text underlying the link
- command string the lua code to run in string format
- hint string the tooltip hint to use for the link
- useCurrentFormat boolean use the format for the window or blue on black (hyperlink colors)
- excludeAll boolean if true, will exclude this from being mirrored to the allTab
- cechoPopup (tabName, text, commands, hints, excludeAll)
-
cechoPopup to a tab
Parameters:
- dechoPopup (tabName, text, commands, hints, excludeAll)
-
dechoPopup to a tab
Parameters:
- hechoPopup (tabName, text, commands, hints, excludeAll)
-
hechoPopup to a tab
Parameters:
- echoPopup (tabName, text, commands, hints, useCurrentFormat, excludeAll)
-
echoPopup to a tab
Parameters:
- tabName string the name of the tab to echoPopup to
- text string the text underlying the link
- commands table the lua code to run in string format
- hints table the tooltip hint to use for the link
- useCurrentFormat boolean use the format for the window or blue on black (hyperlink colors)
- excludeAll boolean if true, will exclude this from being mirrored to the allTab
- addAllTabExclusion (tabName)
-
adds a tab to the exclusion list for echoing to the allTab
Parameters:
- tabName string the name of the tab to add to the exclusion list
- removeAllTabExclusion (tabName)
-
removess a tab from the exclusion list for echoing to the allTab
Parameters:
- tabName string the name of the tab to remove from the exclusion list
- enableBlankLine ()
- Enable placing a blank line between all messages.
- disableBlankLine ()
- Enable placing a blank line between all messages.
- enableScrollbars ()
- Enable scrollbars for the miniconsoles
- disableScrollbars ()
- Disable scrollbars for the miniconsoles
- new (cons, container)
-
Creates a new Embeddable Multi Console Object.
see https://github.com/demonnic/EMCO/wiki for information on valid constraints and defaultsParameters:
- cons table table of constraints which configures the EMCO.
- container GeyserObject The container to use as the parent for the EMCO
Returns:
-
the newly created EMCO