EMCO, the Embeddable Multi Console Object!

Share your scripts and packages with other Mudlet users.
User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

In the meantime, someone fixed a typo and submitted the PR, so new release! https://github.com/demonnic/EMCO/releases/tag/1.4

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

Ok, I decided not to fold the movable functionality into EMCO, as I feel like the adjustable container fills that role nicely on its own and rather than reproducing that functionality myself I lean towards encouraging them to use the adjustable container and then make that the container for the EMCO.

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

EMCO 1.5 released! Get it HERE
Bugfixes
  • If you don't have a tab named All but let allTabName default to All, EMCO will no longer error during instantiation. Also allTabName will now default to the name of the first console in your EMCO if you do not specify one, instead of All which may not exist.
  • If your EMCO is in a container and set to take up 100% of it, it will now properly do so. Thanks @Edru2 for the PR on this one
    You can now :echo to the all tab and it won't double up the echo.
New features
  • Adds wrappers for c/d/h/echoLink/Popup functionality, with timestamps and mirroring to an allTab
  • Adds new optional argument to c/d/h/echo. All your existing calls as myEMCO:echo(tabName, text) will still work, but you can now add , true as the final argument and it will exclude the echo from the all tab. Works for append and all the echo, echoLink, and echoPopup variants.
  • Also adds new constraint, allTabExclusions. This is a table that should contain a list of the tabs you never want mirrors to the all tab.
  • Adds EMCO:addAllTabExclusion(tabName) and EMCO:removeAllTabExclusion(tabName) for interacting with the allTabExclusions table after EMCO instantiation.

starkj
Posts: 12
Joined: Sat Jan 18, 2014 6:14 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by starkj »

Howdy! I'm checking out EMCO, (never used YATCO), but I'm having an issue getting it running.

I'm using this (copied from the example on the wiki, then tweaked the tabs and the size):

Code: Select all

testCon = Geyser.Container:new({
  x = "640",
	y = "0",
	height = "600px",
	width = "295px",
})

local stylesheet = [[background-color: rgb(0,180,0,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
local istylesheet = [[background-color: rgb(60,60,60,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
testEMCO = EMCO:new({
  x = "0",
  y = "0",
  width = "100%",
  height = "100%",
  allTab = true,
  allTabName = "All",
  gap = 2,
  consoleColor = "blue",
  consoles = {
    "Tells",
    "All"
  },
  activeTabCSS = stylesheet,
  inactiveTabCSS = istylesheet,
}, testCon)
And then I have a trigger for detecting tells that does:

Code: Select all

selectCurrentLine()
demonnic.chat:append("Tells")
deselect()
resetFormat()
I see my lovely blue window in the upper right, with 2 tabs - Tells, All, but i'm not seeing any text show up in either of them. I did verify that my trigger is firing. Any suggestions?

Thank you!

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

as that's written, you want testEMCO:append("Tells") , the demonnic.chat is for those who are trying to keep their older yatco stuff working

starkj
Posts: 12
Joined: Sat Jan 18, 2014 6:14 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by starkj »

Worked like a charm, thank you!

Now to add some other chatlines and figure out my multiline trigger. :)

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

EMCO 1.6 released!

Download from https://github.com/demonnic/EMCO/releases/latest
  • preserveBackground does a slightly better job of not cocking up your main screen background colors. More in next update
  • new constraint: font
    what font to use for the miniconsoles
  • new constraint: tabFont
    what font to use for the tabs
  • :setFont(font)
    sets the font for all miniconsoles to font
  • :setSingleWindowFont(tabName, font)
    sets the font for ONLY tabName's miniconsole to font. This is overwritten by a call to setFont(font)
  • :setTabFont(font)
    sets the font for all the tab labels to font
  • :setSingleTabFont(tabName, font)
    sets the font for ONLY tabName's tab label to font. This is overwritten by a call to setTabFont(font)
  • :clear(tabName)
    clears tabName's miniconsole
  • :clearAll()
    clears all of the miniconsoles
This means to clear the "Guild" tab in testEMCO you could call testEMCO:clear("Guild"). To set all the miniconsoles to "Ubuntu Mono", testEMCO:setFont("Ubuntu Mono"). If you only want to set the Local tab to Ubuntu Mono, you would use testEMCO:setSingleWindowFont("Local", "Ubuntu Mono"). Same for setTabFont and setSingleTabFont.

As always, the API docs for the latest version live at: https://demonnic.github.io/EMCO/index.html

WARNING/HEAD'S UP!
If you accessed a miniconsole directly using testEMCO.windows[tabName] that is now living at testEMCO.mc[tabName] , I had erroneously reused the windows table which was already in use by the underlying Geyser container. The changes to setting the fonts for the miniconsoles brought this to my attention. Sorry for any inconvenience.

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

EMCO 2.0 released!

Get it here! https://github.com/demonnic/EMCO/releases/tag/2.0

This release marks the first release of EMCO as a sub-project of the MDK. This means you need to use the mpackage, the xml alone will not do it as it has to require an external .lua file included in the mpackage.

It also adds constraints to create margins around all four edges of the miniconsoles themselves, within the consoleContainer. They are set in pixels, and the constraints are called leftMargin, topMargin, rightMargin, and bottomMargin.

User avatar
Vadi
Posts: 4841
Joined: Sat Mar 14, 2009 3:13 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by Vadi »

Would you be able to update the initial post with simple instructions on how to get started?

User avatar
demonnic
Posts: 661
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO, the Embeddable Multi Console Object!

Post by demonnic »

EMCO 2.1 release: https://github.com/demonnic/EMCO/releases/tag/2.1

Adds

EMCO:deploy(tabName, thingToDisplay) which works like display() but prints to an EMCO tab
EMCO:removeTab(tabName) which peels a tab out of an EMCO and yeets it unceremoniously into the abyss.

Post Reply