Geyser Systems

Share your scripts and packages with other Mudlet users.
icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Geyser Systems

Post by icesteruk »

oh the 'border' is a label :P has nothing to do with the miniconsole, the miniconsole sits within that label

with using ECHO its -
"<PaleGreen>rightarmbro clumsiness<white>, destroyleft<white>, destr

but I want it to colorcode so I thought the Cecho would make it color it?

is they no such way to wordwarp in a mniconsole?

like I said I use this code already in a miniconsole and I get no errors/issues and works how its setout above..

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Geyser Systems

Post by Jor'Mox »

Firstly, setLabelStyleSheet returns no errors seemingly in any circumstances, to include being called for GUI objects that don't exist, and when being given invalid arguments of all sorts. The only way I was able to induce an error was to pass nil in place of the string for the style info.

Second, yes, you can easy set the word wrap for a miniConsole using the setWindowWrap function like this: setWindowWrap("myConsole",50) -- this will wrap the console text at 50 characters.

Third, yes, cecho is the right way to get it to display color. But if echo isn't showing the space, and cecho is, then there is something odd going on with cecho, as opposed to it being a problem with your code per se. Try assembling the entire string you want to write first, and then cecho it all at once, as a whole line, to see if that helps with the spacing issues.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Geyser Systems

Post by icesteruk »

from looks of it, looks not to be echo or cecho but the <colorname> even tho its 'invisible' its giving a space... as the names which dont have a color related to them are fine, but them with a color have a huge space.. I'll look into that..

That wrapwidth worked but didnt work 20 mins ago when I tested..

Your WindowManager is working perfect :) much easier then geysers...

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Geyser Systems

Post by Jor'Mox »

Have you tried writing the line twice, once with cecho and once with echo to test that out? I.E. does everything line up like you are suggesting it would if the spaces are for the color tags? After all, I use colored text with my miniconsole windows without any problems.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Geyser Systems

Post by icesteruk »

Jor'Mox wrote:Have you tried writing the line twice, once with cecho and once with echo to test that out? I.E. does everything line up like you are suggesting it would if the spaces are for the color tags? After all, I use colored text with my miniconsole windows without any problems.
yep it lines up fine with <color>name, <color>name..

I just done some more testing, kept the code all the same but change the miniconsole from
Code: [show] | [select all] lua
createMiniConsole("WindowConsoleShow", 12, 80, 20, 400, 400)
windowManager.add("WindowConsoleShow", "MiniConsole", "1%", "12%", "33%", "47%", "topright")
setWindowWrap("WindowConsoleShow",85)
to this
Code: [show] | [select all] lua
WindowConsoleShow = Geyser.MiniConsole:new({
		name = "WindowConsoleShow",
		fontSize = font_size,
		x = "1%", y = "12%",
		width = "33%", height = "47%",
 })

WindowConsoleShow:setWrap(math.floor(WindowConsoleShow.get_width() / fontx))

and it works fine, as the picture below shows.. :/
Attachments
blah.png
blah.png (2.36 KiB) Viewed 6650 times

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Geyser Systems

Post by Jor'Mox »

So you used WindowConsoleShow:echo() for that? Or something similar?

Edit: As an aside, this is the entirety of the code used by Geyser to cecho something into a window:
Code: [show] | [select all] lua
function Geyser.Window:cecho(message)
   self.message = message or self.message
   cecho(self.name, self.message)
end

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Geyser Systems

Post by icesteruk »

nope, all I changed was the above code, from your WindowManager to the normal Geyser one..

The code to echo/cecho is the same as what it was in the first place ... :/

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Geyser Systems

Post by Jor'Mox »

So, you still just used regular cecho. And Geyser doesn't make a special miniConsole... it just takes your info and creates it for you. It does some management, that is it. The only things I can see that you did in the Geyser example that were different is that you set the font size, which you didn't in the other example, and you set the wrap width differently.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Geyser Systems

Post by icesteruk »

surely the font size wont do them big spaces? ... I'll mess with it some more tomorrow as im at a total lost as I would prefer to use the windowmanagement as then id get a black background (like the rest of the system) instead of grey with geyser lol...

Thanks for your help.

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Geyser Systems

Post by Jor'Mox »

Funny story... it does exactly that. But I don't know why.
I created a blank miniConsole and used cecho to throw some stuff up on it.
Then I changed the font size, and the big spaces immediately went away.

Post Reply