I'm having a little issue with an animation I'm setting up in a weather skin.
Basically I'm moving up an image while fading 4 line of text (first 2 disappear and second 2 appear), wait 3 seconds and revert the process.
So i got the coding right to do exactly that, the only problem I have is if I hover the mouse again on the image when the cycle is running,
the whole thing get screwed...
Any hint will be much appreciated!
Cheers!
brax64
here is my code:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
AntiAlias=1
[Variables]
U=[!UpdateMeasureGroup Weather][!UpdateMeterGroup Weather][!Redraw]
tAlpha=200
iAlpha=15
C=140,140,140
ff=Neon 80s
Degrees=°
img=#@#VClouds Weather Icons\0.png
;=======================================
; Animation
;=======================================
[FadeAlpha]
Measure=Plugin
Plugin=ActionTimer
Group=Weather
ActionList1=In | Wait 50 | Repeat Rise,50,34
In=[!SetVariable iAlpha 15][!SetVariable tAlpha 200]#U#
Rise=[!SetVariable iAlpha (Min(#iAlpha#+7,255))][!SetVariable tAlpha (Max(#tAlpha#-6,0))]#U#
ActionList2=Wait 3000 | Repeat Fall,50,34 | Wait 50 | Out
Fall=[!SetVariable iAlpha (Max(#iAlpha#-7,15))][!SetVariable tAlpha (Min(#tAlpha#+6,200))]#U#
Out=[!SetVariable iAlpha 15][!SetVariable tAlpha 200]#U#
IgnoreWarnings=1
UpdateDivider=-1
DynamicVariables=1
[Transition]
Measure=Plugin
Plugin=ActionTimer
Group=Weather
ActionList1=Wait 300 | Repeat MoveUp,50,20
MoveUp=[!SetOption Icon Y (Clamp([Icon:Y]-1,130,150))]#U#
ActionList2=Wait 3800 | Repeat MoveDn,50,20
MoveDn=[!SetOption Icon Y (Clamp([Icon:Y]+1,130,150))]#U#
IgnoreWarnings=1
UpdateDivider=-1
[Icon]
Meter=Image
ImageName=#img#
SolidColor=0,0,0,1
Group=Weather
W=160
X=80
Y=150
PreserveAspectRatio=1
ImageAlpha=#iAlpha#
AntiAlias=1
DynamicVariables=1
MouseOverAction=[!CommandMeasure FadeAlpha "Execute 1"][!CommandMeasure Transition "Execute 1"][!CommandMeasure Transition "Stop 2"]
MouseLeaveAction=[!CommandMeasure FadeAlpha "Execute 2"][!CommandMeasure Transition "Execute 2"]
[Temp]
Meter=String
Group=Weather
X=175
Y=185
FontSize=18
FontFace=#ff#
AntiAlias=1
FontColor=#C#,#tAlpha#
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
Text=31#Degrees#C
[Cond]
Meter=String
Group=Weather
X=r
Y=30r
FontSize=10
FontFace=#ff#
AntiAlias=1
FontColor=#C#,#tAlpha#
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
Text=Thunderstorm
[Narative1]
Meter=String
Group=Weather
X=r
Y=20r
W=200
H=30
FontSize=10
FontFace=#ff#
AntiAlias=1
FontColor=#C#,(#iAlpha#-30)
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
ClipString=1
Text=Partly cloudy. Highs 30 to 32. Lows 18 to 20