It is currently April 27th, 2024, 1:36 pm

Sliding effects

Report bugs with the Rainmeter application and suggest features.
Unight
Posts: 19
Joined: November 20th, 2012, 5:12 am

Sliding effects

Post by Unight »

Here is sliding a picture, such as the beginning of a picture only shows part when mouse over this image, the picture will slide until the picture full display, when the mouse leaves the picture only show part of Of course, we can also let it slide, until only a part of this effect with the existing rainmeter means can be resolved, such as:

[Rainmeter]
Update=50

[Variables]
bgimg=#CURRENTPATH#\bg.png
openimg=#CURRENTPATH#\open.png
frame=5

[demohide]
meter=Image
imagename=#bgimg#
ImageAlpha=1
UpdateDivider=-1

[openhide]
meter=Image
imagename=#openimg#
ImageAlpha=1
UpdateDivider=-1

[calc]
Measure=Calc
Formula=[calc]+1
DynamicVariables=1
IfequalAction=[!SetOption "calc" "UpdateDivider" "-1"]
IfEqualValue=(#frame#-1)
Disabled=1

[open]
meter=Image
ImageName=#openimg#
y=([demohide:h]/2)-([openhide:h]/2)
ImageRotate=180
DynamicVariables=1
MouseOverAction=[!ShowMeter "demo"][!HideMeter "open"][!EnableMeasure "calc"][!SetOption "calc" "UpdateDivider" "1"][!UpdateMeasure "calc"][!redraw]
imagetint=00000099
greyscale=1
UpdateDivider=-1

[demo]
meter=Image
imagename=#bgimg#
ImageCrop=(-[demohide:w]/#frame#*[calc]),0,([demohide:w]/#frame#*[calc]),([demohide:h]),2
DynamicVariables=1
Hidden=1
x=-1
MouseleaveAction=[!HideMeter "demo"][!ShowMeter "open"][!disableMeasure "calc"][!UpdateMeasure "calc"][!redraw]
imagetint=00000099
greyscale=1

But I think that can be built into rainmeter inside slide this effect, because the effect is very commonly used, and the means to this effect rainmeter need a bit more code. Hopes may be a little more streamlined.