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.
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) Appends the current line from the MUD to a tab.
cecho (tabName, message) cecho to a tab, maintaining functionality
decho (tabName, message) decho to a tab, maintaining functionality
hecho (tabName, message) hecho to a tab, maintaining functionality
echo (tabName, message) echo to a tab, maintaining functionality
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 nil

Parameters:

  • bool item to test for truthiness
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 itself

Parameters:

  • 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 reason

Parameters:

  • wrapAt
append (tabName)
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 prompt

Parameters:

  • tabName string The name of the tab to append the line to
cecho (tabName, message)
cecho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to cecho to
  • message string the message to cecho to that tab's console
decho (tabName, message)
decho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to decho to
  • message string the message to decho to that tab's console
hecho (tabName, message)
hecho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to hecho to
  • message string the message to hecho to that tab's console
echo (tabName, message)
echo to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to echo to
  • message string the message to echo to that tab's console
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 defaults

Parameters:

  • 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
generated by LDoc 1.4.6 Last updated 2019-08-18 00:28:24