Let's show you what a !UpdateMeter bang does. See the next code:
Code: Select all
[Rainmeter]
Update=3000
[Variables]
Col=0
[MeterUpdate]
Meter=Image
SolidColor=255,(240*#Col#),0
X=0
Y=0
W=80
H=50
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Col "(1-#Col#)"][!UpdateMeter "MeterUpdate"][!Redraw]
With the above LeftMouseUpAction option of the [MeterUpdate] meter, you get the color changing instantly when you click the meter. But if you remove either the [!UpdateMeter "MeterUpdate"] bang or both bangs ([!UpdateMeter "MeterUpdate"][!Redraw]), you get the color changing only on next update cycle of the skin (so the change takes up to three seconds). See that doesn't matter too much if the [!Redraw] bang is there or not, if you don't update the meter with the [!UpdateMeter "MeterUpdate"] bang, the change can be seen only when the meter updates on the normal update cycle of the skin. This is normal, because if the meter is not updated (by the !UpdateMeter bang), the redrawn of the skin (done with the !Redraw bang) doesn't matter, the meter keeps its previous state. The !UpdateMeter bang, along with the !Redraw bang fix this, getting an immediate update of the meter and redrawn of the skin, without having to wait for the next normal update cycle.
Yep, I had this kind of approach on all buttons of my Mirage suite (yep, this again is a self-promotion). For instance the eject button looks this way in those skins: This is done not using an image, but a font.
To use this symbol, first you have to download the appropriate font (in this case Guifx v2 Transports.ttf, available for example here). Download it and move the file to the @Resources\Fonts folder of your skin (if the Fonts folder doesn't exist, just create it).
Then I used the following meter to create the appropriate symbol:
Code: Select all
[MeterEjectLabel]
Meter=String
X=30
Y=25
W=46
H=26
FontSize=14
StringAlign=CENTERCENTER
FontColor=220,220,220
FontEffectColor=0,0,0
SolidColor=0,0,0,100
StringEffect=Shadow
FontFace=Guifx v2 Transports
StringStyle=BOLD
AntiAlias=1
Text='
LeftMouseUpAction=[!CommandMeasure "MeasureUDisk" "RemoveDrive"]
Don't worry, happens to all of us, from time to time.