CSS Styling on Gauges
CSS Styling on Gauges
Is there any way I'm not aware of to attach CSS styles to gauges made with Geyser? Because I'd very much like to do something like Vadi's fancy gauges.
Re: CSS Styling on Gauges
Geyser:setStyleSheet
Re: CSS Styling on Gauges
Care to expand on this please, a simple example would be greatVadi wrote:Geyser:setStyleSheet
for instance how do you go about setting a radius?
border-radius:5px
thanks
Silv
Re: CSS Styling on Gauges
Oh certainly. Conslo was just looking for a setLabelStyleSheet() equivalent for Geyser
Say you make a new Label:
We can add a background colour do it and echo some text inside:
Say you make a new Label:
and you get a box top-left of the screen. Then you add the border to it, so the code becomes:
... and the box goes away. Well, it went away because your label is transparent now that we've applied some CSS without giving it any colours. Your border also while having a curvy corner, does not have a border drawn to begin with to be showing. So we add a 2px wide red border:
and voila, you get a pretty box.
We can add a background colour do it and echo some text inside:
Hope that helps!
Re: CSS Styling on Gauges
Great work
Thanks
Silv
Thanks
Silv
Re: CSS Styling on Gauges
Should have tested it first
Does the same apply for guages?
I used
healthBar:setStyleSheet([[
border: 2px solid red;
border-radius: 5px;
]])
and got error
attempt to index global 'healthbar' (a nil value)
Does the same apply for guages?
I used
healthBar:setStyleSheet([[
border: 2px solid red;
border-radius: 5px;
]])
and got error
attempt to index global 'healthbar' (a nil value)
Re: CSS Styling on Gauges
Yes the same applies to gauges - but you need to make it with Geyser to happen, so if you didn't do the healthBar = Geyser... business but createGauge, then you use setLabelStyleSheet("healthbar", [[ ...
Re: CSS Styling on Gauges
One word,
Magic!!!!
I'm to embarased to tell you what I was doing.
Magic!!!!
I'm to embarased to tell you what I was doing.