setStyleSheet inquiry

Post Reply
Narnai
Posts: 7
Joined: Fri Mar 20, 2015 9:35 am

setStyleSheet inquiry

Post by Narnai »

Hi, hello.

I've been using Mudlet for a while now, but I've been sticking to the basics (triggers, aliases and all that good, noob stuff) but recently I decided to get into it a bit more, and perhaps make my UI a bit more appealing. And that was where I got stuck :/

Long story short, every time I try to use setStyeSheet (be it when I try to make something on my own, or download any of the nice scripts around here) Mudlet says..."attempt to call method 'setStyleSheet' (a nil value)". I did my best to figure out why that was happening and how to fix it but no luck - and I'm getting kind of desperate here.

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

Re: setStyleSheet inquiry

Post by Vadi »

Could you post examples of what are you using?

Narnai
Posts: 7
Joined: Fri Mar 20, 2015 9:35 am

Re: setStyleSheet inquiry

Post by Narnai »

Thanks for help, but I actually managed to solve the issue :) It seems I was missing part of the code (or at least that was how I saw it). Managed to make it work after I completely cleaned up my system and downloaded everything I wanted again. And yes, I've tried that before but it wasn't helping... No idea. Glad it all works now though.

On the almost same note, is there a way to use different fonts on labels? I've been playing with Geyser, but I can't seem to figure that out.

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

Re: setStyleSheet inquiry

Post by Akaya »

I use tags in my echo to set the font.
Code: [show] | [select all] lua
my_label:echo([[<span style="font-size: 12pt">Hello World<\span>]])
Written from my phone.

User avatar
Gilmo
Posts: 25
Joined: Fri Feb 11, 2011 11:43 am

Re: setStyleSheet inquiry

Post by Gilmo »

mudlet uses QT stylesheet, so this should get you started (not sure about version). You probably know most of this, but yes, there's everything you might want to know for future needs about :setStyleSheet() at that domain

Narnai
Posts: 7
Joined: Fri Mar 20, 2015 9:35 am

Re: setStyleSheet inquiry

Post by Narnai »

Got it! Thank you for your help.

Post Reply