thesurfinsuricate wrote: ↑April 14th, 2023, 8:21 pmI would like the animation to start from
frame 1
balala wrote: ↑April 14th, 2023, 8:59 pmIf you want the animation to start from frame 1, not 0
Technically,
[MeasureAnimation] will actually start by having an initial value of 1 and not 0 after its update, because the result of the formula in the first update of the measure would be
MeasureAnimation + (MeasureAnimation < 18) = 0 + (0 < 18) = 0 + 1 = 1 - you can easily notice this if you set an
UpdateDivider=-1 on the measure, for example. Whether that "1" is the desired "frame 1" in the request is open to interpretation, I'm just talking about the measure itself, since that is the reference for the meter.
Sure, by disabling / enabling that measure and adding a
[MeasureAnimation2] as above, the animation will start at frame 1 ... but when mouse leaves the area and the measure is disabled, the measure values returns to 0 and 1 instead of staying the same, which might not be what is desired (as far as I understood, frame 1 should be displayed again only on animation restart, when the mouse is again over the area, not when it leaves). Another question is what happens to frame 0 if the animation runs from frame 1 to frame 18, would it still be in the .png, because as far as I can see, it won't ever be used? Lastly, if I'm not missing anything obvious here, if
[MeasureAnimation2] runs from 1 to 18, then
[MeasureAnimation] should stop at 17, not to mention that BitmapFrames should be 19 to include the assumed frame 0.
Anyway, considering the above, some small changes (I left out the unimportant parts of the code):
Code: Select all
[Rainmeter]
Update=170
[MeasureAnimation]
Disabled=1
Measure=Calc
Formula=MeasureAnimation + (MeasureAnimation < 17)
[MeasureAnimation2]
Measure=Calc
Formula=( MeasureAnimation + 1 )
[MeterAnimation]
Meter=BitMap
MeasureName=MeasureAnimation2
BitmapImage=#@#Images\ChronoTrigger\ChronoTrigger06.png
BitmapFrames=19
BitmapExtend=1
MouseOverAction=[!UnpauseMeasure MeasureAnimation][!DisableMeasure MeasureAnimation][!UpdateMeasure MeasureAnimation][!UpdateMeasure MeasureAnimation2][!EnableMeasure MeasureAnimation]
MouseLeaveAction=[!PauseMeasure MeasureAnimation]
Feel free to disagree or disregard, if my understanding of the request has been faulty.