Vyzor, UI Manager for Mudlet

Share your scripts and packages with other Mudlet users.
User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

From what I understand, CEcho() doesn't work properly with Vyzor at the moment. Are you still able to Echo() to your miniConsoles?

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Lezard »

I can echo and cecho because they were both working at first when I only had one or two consoles. But now they are barely working at all. I'm not at the computer right now but ill test them with just echo later and post an update..

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Delrayne »

CEcho() should work in Vyzor miniconsoles. I haven't gotten them to work in the chat widget, and I haven't tried them on anything else, but for miniconsoles it should work fine. SYNTAX: consoleName:CEcho("<red>This is red text in the miniconsole named consoleName")

dracmas
Posts: 5
Joined: Sat Jan 05, 2013 11:30 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by dracmas »

I'm trying to wrap my head around how a layout would be done in vyzor.
The only thing I can understand so far is setting the boarders.
function layout()
Vyzor.Options.Borders = {Top = 0.3, Bottom = 0.3, Left = "dynamic", Right = "dynamic"}
end
I've used Geyser and know of containers and labels. Here's how I set things up there.

pastebin.com/g4PgX1Su

How is the equivalant set up for Vyzor. Just barebones kinda like that so I can add on top of it.
Ive seen some of the features you have on here and would like to use them, but if I cant wrap my head
around how each "Container/area" is set up and labels to go in them I'll never be able to get anywhere
with this UI. It took me about a week to understand the layout with the tutoril, but the only thing I
see here is the api page, which doesn't give a basic layout.

Can someone show me something simple so I can build upon it and improve? I'm willing to do the work, but really don't know where to start.

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Oneymus »

First, a general announcement: Through the course of working on this particular project, I updated the Font Component. It works now! However, it does break backwards compatibility (specifically, constructor has a new argument). On the upside, you can now specify Font family! Check out the wiki and pick up the new Vyzor on Github!

Now, on to dracmas: I did a rewrite of your snippet in Vyzor. It's heavily commented, and -should- work. Did for me, but that never means anything. Go here! Changes made are superficial (font-size threw me for a loop; no clue why I wasn't getting the same result you were: they're all stylesheets!). As for your long strings, you can simply copy/paste your old ones. I left them all "nil" in case other people wanted to use the snippet, but didn't feel like going through and removing all of the variables.

I apologize for pastebin's mangling of my formatting: should be fine in Mudlet. Let me know if you have any questions!

dracmas
Posts: 5
Joined: Sat Jan 05, 2013 11:30 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by dracmas »

I'm currently looking through the script to see how you have it running.
Before I only had three scripts:
Server_ID - whch detected msdp
initialise_msdp - loaded msdp so the variables would work with layout.
and layout was last - had all the handlers that would start layout to run again once any of my variables changed.
-- Vyzor doesn't like it when you try to redraw some stuff, so we only want to call layout once.
if not uiDrawn then
layout()
uiDrawn = true
end
Ok in the Vyzer script. Layout function sets everything up. Then the updateui function would be for data updating.
I had the layout function just running through completely each time a variable update, not ideal or even close to the best way, but it worked.
I saw the condition at the end where it checked if the ui handler was made or not, and draws layout if it isnt. So I'd be ok with just calling updateui instead of layout?

Lastly for now, I'm getting an error. Lua Syntax error:../mudlet/profile/letsdothis/vyzor/component/font.lua: bad arugument to 'format' ('string expected, got nil)

I think its the part in the script where you're defining font. Line 59 ends up being the last line in this quote.
-- Like our top_container, we make a new Frame. This time, though, we set our dimensions.
-- Height is .25 (or 25% of its parent). In this case, the parent is Vyzor.Left, a Border
-- Frame Vyzor creates that is exactly the size of Mudlet's left border.
Locations = Vyzor.Frame( "Locations", 0, 0, 1, .25 )
-- Shared border.
Locations:Add( ui_border )
-- Font.
Locations:Add( Vyzor.Font( 10, "Monospace", Vyzor.FontWeight.Bold ) )
-- Color.
Locations:Add( Vyzor.Color( Vyzor.ColorMode.Name, "white" ) )
-- And add the new Frame (Locations) to Vyzor.Left.
Vyzor.Left:Add( Locations )
It looks like you defined it properly after looking through the API page. Not sure whats going on though.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

Oneymus wrote: On the upside, you can now specify Font family! Check out the wiki and pick up the new Vyzor on Github!
I'm glad this feature is now available with Vyzor. Very glad. Keep up the good work Oneymus!

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Oneymus »

dracmas: You'll need to download and install the new Vyzor .mpackage from Github; it has a fix for that bug.

Also, that update function does not call layout; that's hanlded when the script is loaded: i.e, when Mudlet loads, or you save the script.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

Getting the following error when trying to run a script:

Lua syntax error:...tt/.config/mudlet/profiles/Vyzor/vyzor\enum/init.lua:58: stack overflow

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

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Vadi »

You'll want to post a sample script that exhibits the problem, to help in locating the issue and confirming it's fixed after.

Post Reply