Nilvarno wrote: ↑October 24th, 2020, 10:13 pm
thank you very much, it's working but it seems to be quite slow even setting speed to 10 and below, and the fade isn't smooth. Actually below 20 doesn't change at all, don't know if 20 is the minimum. It's sad a !ShowFadeMeter command doesn't exist, the usuale !fade command is really smooth.
Thanks again anyway.
Decreasing the value of the #Speed# variable is not the only way of making the fade go faster. You can also decrease the number of repeats, i.e. the 10 in
Repeat In,#Speed#,10 and similar areas, while also increasing the amount by which the animation variable changes, i.e. the 25.5 in
[!SetVariable Alpha "(Clamp((#Alpha#+25.5),0,255))"] and similar areas. For example, you could change the 10 to 5 and change the 25.5 to 51 (so dividing the 10 by 2 and multiplying 25.5 by the same amount - notice the inverted proportionality here). If it was not clear by now, these things can and should be applied to the "Out" process as well, leaving the sign of the operations unchanged.
Naturally, you could very well have a combination of small #Speed# and number of repeats, coupled with a large amount by which the fade variable is changing, to achieve a very fast effect...
HINT: The 25.5 value can actually be expressed as 255/10. In other words, the amount by which the fade variable is changing should be equal to
(255/numberofrepeats). Of course, if you create and use a variable that stores the number of repeats, you can use it in such a formula in the !SetVariable-s, to further "automate" the change of the fading rate:
Code: Select all
[Variables]
Alpha=0
Speed=2
Repeat=5
U=[!UpdateMeasure "MeasureSlide1"][!UpdateMeter "GamingSlot.1H"][!Redraw]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
---Measures---
[MeasureSlide1]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat In,#Speed#,#Repeat#
In=[!SetVariable Alpha "(Clamp((#Alpha#+255/#Repeat#),0,255))"]#U#
ActionList2=Repeat Out,#Speed#,#Repeat#
Out=[!SetVariable Alpha "(Clamp((#Alpha#-255/#Repeat#),0,255))"]#U#
DynamicVariables=1
---Meters---
[GamingSlot.1]
Meter=image
;ImageName=#G[S.1-A]#
ImageName=#@#a.png
;X=10
;Y=504
w=720
h=404
;MouseOverAction=[!ShowMeter GamingSlot.1H][!Redraw]
;MouseLeaveAction=[!HideMeter GamingSlot.1H][!Redraw]
MouseOverAction=[!CommandMeasure "MeasureSlide1" "Stop 1"][!CommandMeasure "MeasureSlide1" "Stop 2"][!CommandMeasure "MeasureSlide1" "Execute 1"]
MouseLeaveAction=[!CommandMeasure "MeasureSlide1" "Stop 1"][!CommandMeasure "MeasureSlide1" "Stop 2"][!CommandMeasure "MeasureSlide1" "Execute 2"]
Group=Page2
[GamingSlot.1H]
Meter=image
;ImageName=#G[S.1-B]#
ImageName=#@#b.png
;X=10
;Y=504
w=720
h=404
LeftMouseUpAction=["steam://rungameid/976730"]
;Hidden=1
ImageAlpha=#Alpha#
DynamicVariables=1
I used my own images in the above code instead of the unavailable yours, but you get the idea.