[Leezard micro tip] Temperature indicator (including negative temp)

Hi all, here is a micro tip for a linear temperature indicator.
I started from @Tomaja tutorial for linear battery indicator

You’ll have to create two patterns, one for positive temp, and one for the negative temp.
The positive pattern has to be aligned on bottom, center

the negative one has to be aligned on top, centered

For this example, the “hot” pattern is 80 pix. high, and the “cold” is 50 pixels.

So, in “height” the basic formula should be :

“Hot temp”
(Temperature) * (height/100)
But… if temp is higher than 100 (damn hot but it can be !!), your bar will be higher than your mask !
we’ll adding a conditionnal item : if temp >100, just indicate the total height of my mask. If its fewer, give me the right status :


“Cold” temp
same formula, but with the negative max height :


Now, let’s get them transparent :



You can see the result here :

Hope it will help some of you !!


Well presented and clear. I am sure people will find it useful. :+1:

Fine explanation!