masterelf425900 wrote: ↑June 26th, 2024, 5:38 pm
This is what I'm trying to copy
https://imgur.com/dqmpe6h (It's from nightTab firefox extension)
This is what I've been able make so far
https://imgur.com/LyGIZOr
as you can see its instant and looks laggy as their's no animation or fade delay. At best I want to make the animation smooth like in the first link and at worst a simple fade effect will do. I have no knowledge in programming and thanks in advance
For this you'll need an ActionTimer plugin measure. Such a measure can do what you asked for.
Here is a short example, but this can't be applied directly to your skin. I've created here a simple String meter, showing an A, but in your case this should be an Image meter (I used a String meter, because you didn't post an image). If you're hovering the mouse over the meter you'll see the result. There are some possibilities even if you use images instead of string, however (at least) one of the used images would be needed, for a better code.
So try out this code, to see if you like it:
Code: Select all
[Rainmeter]
Update=1000
BackgroundMode=2
Solidcolor=255,0,0,100
[Variables]
Alpha=0
[MeasureFade]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat FadeIn,20,10
FadeIn=[!SetVariable Alpha "(Clamp((#Alpha#+22),0,220))"][!UpdateMeasure "MeasureFade"][!UpdateMeter "MeterString"][!Redraw]
ActionList2=Repeat FadeOut,20,10
FadeOut=[!SetVariable Alpha "(Clamp((#Alpha#-22),0,220))"][!UpdateMeasure "MeasureFade"][!UpdateMeter "MeterString"][!Redraw]
DynamicVariables=1
[MeterString]
Meter=STRING
X=90
Y=55
W=160
H=100
Padding=15,5,15,5
FontColor=(220-#Alpha#),(220-#Alpha#),(220-#Alpha#)
FontEffectColor=#Alpha#,#Alpha#,#Alpha#
StringEffect=Shadow
SolidColor=0,150,0,150
FontSize=38
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Text=A
DynamicVariables=1
MouseOverAction=[!CommandMeasure "MeasureFade" "Execute 1"][!CommandMeasure "MeasureFade" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade" "Stop 1"][!CommandMeasure "MeasureFade" "Execute 2"]
If you like it, upload one of those images, please. The speed of animation can easily be adapted to your needs.