Create miniconsoles with ease

Share your scripts and packages with other Mudlet users.
Post Reply
johndahlstrom
Posts: 9
Joined: Tue Aug 11, 2009 8:45 am
Location: Sweden

Create miniconsoles with ease

Post by johndahlstrom »

You'll see this script in coming release of Mudlet. But for those bleeding edge people, here you go:

Code: Select all

-- Make a new console window with ease. The default background is black and text color white.
--
-- Example:
-- 
-- createConsole("myConsoleWindow", 8, 80, 20, 200, 400)
-- 
-- This will create a miniconsole window that has a font size of 8pt, will display 80 characters in width,
-- hold a maximum of 20 lines and be place at 200x400 of your mudlet window.
-- If you wish to change the color you can easily do this when updating your text or manually somewhere, using
-- setFgColor() and setBackgroundColor().

function createConsole(consoleName, fontSize, charsPerLine, numberOfLines, Xpos, Ypos)

	createMiniConsole(consoleName,0,0,1,1)
	setMiniConsoleFontSize(consoleName, fontSize)
	local x,y = calcFontSize( fontSize )
	resizeWindow(consoleName, x*charsPerLine, y*numberOfLines)
	setWindowWrap(consoleName, Xpos)
	moveWindow(consoleName, Xpos, Ypos)

	setBackgroundColor(consoleName,0,0,0,0)
	setFgColor(consoleName, 255,255,255)

end

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: Create miniconsoles with ease

Post by Jules »

I've been wondering how building mini-consoles worked! Thank you for making this!

Now, something a little more advanced, how to you set a window to take all of the chat displays one uses (tells, guild aethers, city aethers, etc... for all of you IRE people who know what I'm talking about), and put them into one display that's tabbed?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Create miniconsoles with ease

Post by Heiko »

checkout the tab-window-chat package in the package section

Post Reply