Your slider moves from left to right (though you stated you wanted the other direction )
Working with your code, here are a few suggested changes:
You want your slide action to happen when you hover over the IMAGE ([GENSHIN IMPACT]), so move the MouseOverAction/MouseLeaveAction bangs to the [GENSHIN IMPACT] IMAGE meter. Rearrange the bangs in MouseOverAction to "STOP" the other action before starting the desired one.Change the initial width to zero so the overlay is not showing.
Change the CLAMP values to progress from zero to the image width (550).
Your action adds/subtracts "20" pixels on each repeat, so you only need 28 steps not 550; 550/20=27.5 rounds up to 28.Mouse hover animation Modified Code
Working with your code, here are a few suggested changes:
You want your slide action to happen when you hover over the IMAGE ([GENSHIN IMPACT]), so move the MouseOverAction/MouseLeaveAction bangs to the [GENSHIN IMPACT] IMAGE meter. Rearrange the bangs in MouseOverAction to "STOP" the other action before starting the desired one.
Code:
[GENSHIN IMPACT]Meter=ImageImageName=#@#genshin.pngMouseOverAction=[!CommandMeasure "MeasureWidth" "Stop 2"][!CommandMeasure "MeasureWidth" "Execute 1"]MouseLeaveAction=[!CommandMeasure "MeasureWidth" "Stop 1"][!CommandMeasure "MeasureWidth" "Execute 2"]DynamicVariables=1LeftMouseUpAction=["C:\Program Files\HoYoPlay\launcher.exe"]
Change the CLAMP values to progress from zero to the image width (550).
Your action adds/subtracts "20" pixels on each repeat, so you only need 28 steps not 550; 550/20=27.5 rounds up to 28.
Code:
[Variables]Width=0U=[!UpdateMeasure "MeasureWidth"][!UpdateMeter "MeterBackground"][!Redraw][MeasureWidth]Measure=PluginPlugin=ActionTimerGroup=SlidersActionList1=Repeat Increase,10,28Increase=[!SetVariable Width "(Clamp((#Width#+20),0,550))"]#U#ActionList2=Repeat decrease,10,28Decrease=[!SetVariable Width "(Clamp((#Width#-20),0,550))"]#U#DynamicVariables=1
Statistics: Posted by eclectic-tech — Today, 2:02 pm