Vyzor, UI Manager for Mudlet

Share your scripts and packages with other Mudlet users.
User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

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

Post by Oneymus »

Well, it's not fair to say VyzorLoadEvent is buggy, since it does exactly what it's meant to do. It's an event raised when Vyzor is finished loading.

Without knowing what his error is (since Mudlet's error messages from events suck), I can't provide help.

The problem you and I faced, Delrayne, is that you defined everything beforehand, and tried to call drawGUI() -after- VyzorLoadEvent had been raised. The proper way to use VyzorLoadEvent is to define your GUI by responding to the raised event.

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

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

Post by Delrayne »

Ah see, I thought it was more technical than I was making it out. You know I still love Vyzor though, even if I can't get the LoadEvent to work :P

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

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

Post by kevutian »

The problem is not with Vyzor. At all. That window resize event error happens -all- the time. Even on a fresh profile.

User avatar
Calixa
Posts: 25
Joined: Sat Nov 20, 2010 5:51 pm
Location: Lusternia

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

Post by Calixa »

Yeah, I solved it in the same way as Delrayne. If it is not Vyzor then great, but since I ran into trouble by trying to use a Vyzor event, that leads to the automatic assumption that maybe it is a Vyzor thing. I <3 Vyzor, seriously, no offense intended :< As for manually calling, that was just me trying to illustrate that it does work when you do it that way. I can live with the current fix, but it may lead to confusion for people who will only start using the framework in the future. So maybe for the time being a note about it on the wiki would work?

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

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

Post by Oneymus »

Calixa wrote:Yeah, I solved it in the same way as Delrayne. If it is not Vyzor then great, but since I ran into trouble by trying to use a Vyzor event, that leads to the automatic assumption that maybe it is a Vyzor thing. I <3 Vyzor, seriously, no offense intended :< As for manually calling, that was just me trying to illustrate that it does work when you do it that way. I can live with the current fix, but it may lead to confusion for people who will only start using the framework in the future. So maybe for the time being a note about it on the wiki would work?

So you have verified that the function works when called manually? I can't help you (or anyone who may use the event in the future) if you don't supply me the information I need.

User avatar
Calixa
Posts: 25
Joined: Sat Nov 20, 2010 5:51 pm
Location: Lusternia

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

Post by Calixa »

Sorry, thought I was clear in my previous explanation. Yes, my function works when called manually. It also works when sysLoadEvent is used as the registered event handler. If I take that away, leaving only VyzorLoadEvent, then the UI no longer gets drawn on starting client + loading profile.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

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

Post by Caled »

I've reached the point in my framework where I am working on greying out the skill icons while they are unavailable.
I'm attempting to do it by superimposing another frame over the top if it, with a background colour + translucency. I wish to do it this way because I intend to have an image for every ability in the game. Also, to provide an easy way for people to add their own images that represent functions they write for themselves. I'd rather not require people to muck around in an image editor.

I create a frame (lyr.test.window), and add an image. This shows up.
I create a frame (lyr.test.overlay), and add a background.
I add the second frame to the first.

Instead of being grey, it is solid white. I enter a couple of things at the command line to see what is going on:

@lyr.test.overlay.Stylesheet
'color: rgba(10, 10, 10, 100);'
lua lyr.test.overlay:Hide()
lua lyr.test.overlay:Show()

(@ is an alias that uses display() on any table following it, and 'lua' in an alias allowing me to run lua at the command line)
As you can see, the overlay frame is not opaque white.
And with use of hide/show I can check that the image is there and that the problem is only linked to the overlay frame.

Other tests I've run include:
@lyr.test.window.Frames
@lyr.test.window.Components
@lyr.test.overlay.Frames
@lyr.test.overlay.Components

These show that I haven't accidentally added any extra frames or backgrounds etc - everything is as it ought to be.

Is it possible that there is a bug here, where placing a background frame over an image isn't being drawn correctly and is defaulting to white?

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

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

Post by Oneymus »

Any improperly formatted style sheet shows up grey/white. Your background colour isn't being added properly. It should be "background-color:".

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

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

Post by Oneymus »

To clarify my earlier statement (written from my phone, so it was brief), you should be able to get your desired outcome if you declare your overlay frame like this...
Code: [show] | [select all] lua
overlay_frame = Vyzor.Frame( "overlay" )
overlay_frame:Add(
  Vyzor.Background(
    Vyzor.Brush(
      Vyzor.Color( Vyzor.ColorMode.RGBA, 10, 10, 10, 100 )
    )
  )
)
Adding a Color Component directly to a Frame colours the text of that Frame.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

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

Post by Caled »

Thanks heaps. Turned out to be a tiny mistake making me skip that background/brush bit. It's all working now.

Post Reply