Difference between revisions of "User:Zooka"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
| − | + | <syntaxhighlight lang="lua"> | |
| + | -- first, determine the size of your screen | ||
| + | local windowWidth, windowHeight = getMainWindowSize() | ||
| − | + | -- create the miniconsole | |
| + | createMiniConsole("sys", windowWidth-650,0,650,300) | ||
| + | setBackgroundColor("sys",255,69,0,255) | ||
| + | setMiniConsoleFontSize("sys", 8) | ||
| + | -- wrap lines in window "sys" at 40 characters per line - somewhere halfway, as an example | ||
| + | setWindowWrap("sys", 40) | ||
| − | + | echo("sys","Hello world!\n") | |
| − | + | cecho("sys", "<:OrangeRed>This is random spam with the same background\n") | |
| − | + | cecho("sys", "<blue:OrangeRed>and this is with a blue foreground. ") | |
| − | + | cecho("sys", "<bisque:BlueViolet>Lastly, this is with both a foreground and a background.\n") | |
| − | + | </syntaxhighlight> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 03:26, 16 February 2026
-- first, determine the size of your screen
local windowWidth, windowHeight = getMainWindowSize()
-- create the miniconsole
createMiniConsole("sys", windowWidth-650,0,650,300)
setBackgroundColor("sys",255,69,0,255)
setMiniConsoleFontSize("sys", 8)
-- wrap lines in window "sys" at 40 characters per line - somewhere halfway, as an example
setWindowWrap("sys", 40)
echo("sys","Hello world!\n")
cecho("sys", "<:OrangeRed>This is random spam with the same background\n")
cecho("sys", "<blue:OrangeRed>and this is with a blue foreground. ")
cecho("sys", "<bisque:BlueViolet>Lastly, this is with both a foreground and a background.\n")