ANN0Y1NGHACKER wrote:I added the code for the image to change on hover but it changes suddenly and looks really bad. Is there a way to change the image with a fade transition between them?
Did you mark accidentally this thread as being solved?
If so, here is a first solution.
First for a such action (to fade out one image and simultaneously fade in another one), you need two different image meters, one with the first image and the second with the second image. The meters must have to be placed in the same location and must have the same size. Initially the first image is visible and the second is transparent and when you're hovering the mouse over it, this is changing: the first will fade out and the second will fade in. Then, when you're leaving the meter, the opposite process will go on: first meter will fade in and the second will fade out.
To make all this, you need a variable. I named it Fade. Its value will vary between 0 (the first meter is completely opaque, the second is completely transparent) and 10 (the first meter is completely transparent, the second is completely opaque). The value of this variable is set through ActionTimer plugin.
Here is a code to make all this. I didn't test it yet, so please test it and let me know if something is going wrong.
Code: Select all
[Rainmeter]
Update=1000
[Metadata]
Name=Chrome
Author=ANN0Y1NGHACEKR
[Variables]
Fade=0
U=[!UpdateMeasure "MeasureAlpha"][!UpdateMeterGroup "Chrome"][!Redraw]
[MeasureAlpha]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat FadeIn,10,10
FadeIn=[!SetVariable Fade "(Clamp((#Fade#+1),0,10))"]#U#
ActionList2=Repeat FadeOut,10,10
FadeOut=[!SetVariable Fade "(Clamp((#Fade#-1),0,10))"]#U#
DynamicVariables=1
[Chrome]
Meter=Image
ImageName=#@#Images\Square\chrome.png
H=68
LeftMouseDoubleClickAction=["C:\Users\*name*\Desktop\Google Chrome"]
MouseOverAction=[!CommandMeasure "MeasureAlpha" "Execute 1"][!CommandMeasure "MeasureAlpha" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureAlpha" "Stop 1"][!CommandMeasure "MeasureAlpha" "Execute 2"]
ImageAlpha=(25.5*(10-#Fade#))
Group=Chrome
DynamicVariables=1
[Chrome2]
Meter=Image
ImageName=#@#Images\Square\chrome1.png
X=0r
Y=0r
H=68
LeftMouseDoubleClickAction=["C:\Users\*name*\Desktop\Google Chrome"]
MouseOverAction=[!CommandMeasure "MeasureAlpha" "Execute 1"][!CommandMeasure "MeasureAlpha" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureAlpha" "Stop 1"][!CommandMeasure "MeasureAlpha" "Execute 2"]
ImageAlpha=(25.5*#Fade#)
Group=Chrome
DynamicVariables=1