Page 1 of 1

setStyleSheet inquiry

Posted: Fri Mar 20, 2015 9:44 am
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.

Re: setStyleSheet inquiry

Posted: Sat Mar 21, 2015 4:10 am
by Vadi
Could you post examples of what are you using?

Re: setStyleSheet inquiry

Posted: Sat Mar 21, 2015 6:14 pm
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.

Re: setStyleSheet inquiry

Posted: Sat Mar 21, 2015 6:19 pm
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.

Re: setStyleSheet inquiry

Posted: Sun Mar 22, 2015 12:35 am
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

Re: setStyleSheet inquiry

Posted: Sun Mar 22, 2015 2:16 pm
by Narnai
Got it! Thank you for your help.