It is currently December 10th, 2018, 5:20 am

Sliding image

Help with creating, editing & fixing problems with skins
xenium
Posts: 306
Joined: January 4th, 2018, 9:52 pm

Sliding image

xenium » March 11th, 2018, 9:12 am

Hi
In the skin below I would like the right image (glass.png) when clicking on the header to slide right, out and back.
TestSkin.zip
How can I do that?
You do not have the required permissions to view the files attached to this post.
User avatar
ChicknwithNoName
Posts: 18
Joined: February 17th, 2018, 11:08 pm

Re: Sliding image

ChicknwithNoName » March 11th, 2018, 9:46 am

You could start with searching the forum then try implementing the examples. Check out: https://forum.rainmeter.net/viewtopic.php?p=144130#p144130
User avatar
dvo
Posts: 538
Joined: February 7th, 2016, 6:08 am

Re: Sliding image

dvo » March 11th, 2018, 12:24 pm

just copy jsmorleys script and alter it :) me too balala... mixed info ...
Last edited by dvo on March 11th, 2018, 12:50 pm, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 7144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Sliding image

balala » March 11th, 2018, 12:38 pm

Not exactly sure what you mean by
xenium wrote:slide right, out and back.
You'd like to slide the image to right, until it goes out of the skin, then back, to the same position as initial?
User avatar
dvo
Posts: 538
Joined: February 7th, 2016, 6:08 am

Re: Sliding image

dvo » March 11th, 2018, 12:56 pm

i hope it's from the right sliding >>out>> and after leave sliding back ;-)
xenium
Posts: 306
Joined: January 4th, 2018, 9:52 pm

Re: Sliding image

xenium » March 11th, 2018, 1:01 pm

balala wrote:Not exactly sure what you mean by

You'd like to slide the image to right, until it goes out of the skin, then back, to the same position as initial?
not,
as it is now, when you click on the header to go back, and when you give it again click on the header to come back
I tried with an example on the forum but I did not get it
TestSkin.zip
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 18432
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Sliding image

jsmorley » March 11th, 2018, 1:56 pm

Still not obvious to me what effect you are looking for. Please be clear...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3049
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Sliding image

eclectic-tech » March 11th, 2018, 2:41 pm

From your description, this seems to be what you want this (click to animate):
glass.gif
You are trying to move multiple images, when it is simpler to set them relatively and just move one of them. The code below will give you the above action.

If we misunderstood, then a precise step by step (spoon-feed-me) explanation would help.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Sliders][!Redraw]
W=1
Offset=-150
SlideAmount=10
RightOffset=205

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Right,#W#,20
; | Wait 1 | HeaderOut
ActionList2=Repeat Left,#W#,20
; | Wait 1 | HeaderIn
Right=[!SetVariable Offset "(Clamp(#Offset#+#SlideAmount#,-150,0))"]#U#
HeaderOut=[!SetOption Header ImageName "header.png "]#U#
Left=[!SetVariable Offset "(Clamp(#Offset#-#SlideAmount#,-150,0))"]#U#
HeaderIn=[!SetOption Header ImageName "header.png "]#U#
IfCondition=#Offset# = -150
IfTrueAction=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]"""]
IfCondition2=#Offset# = 0
IfTrueAction2=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]"""]
DynamicVariables=1

[background]
Meter=Image
ImageName=#@#bg.png 
X=0
Y=0

[glass]
Meter=Image
Group=Sliders
ImageName=#@#glass.png 
X=(398 + #Offset#)
Y=17
W=150	
H=260
DynamicVariables=1
hidden=0

[Header]
Meter=Image
ImageName=#@#header.png 
X=R
;(545 + #Offset#)
Y=2
W=15
H=260
DynamicVariables=1

If you just want the glass to move, and the header to not, like this (click to animate):
glass2.gif
Use this code

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Sliders][!Redraw]
W=1
Offset=-150
SlideAmount=10
RightOffset=205

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Right,#W#,20
; | Wait 1 | HeaderOut
ActionList2=Repeat Left,#W#,20
; | Wait 1 | HeaderIn
Right=[!SetVariable Offset "(Clamp(#Offset#+#SlideAmount#,-150,0))"]#U#
HeaderOut=[!SetOption Header ImageName "header.png "]#U#
Left=[!SetVariable Offset "(Clamp(#Offset#-#SlideAmount#,-150,0))"]#U#
HeaderIn=[!SetOption Header ImageName "header.png "]#U#
IfCondition=#Offset# = -150
IfTrueAction=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]"""]
IfCondition2=#Offset# = 0
IfTrueAction2=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]"""]
DynamicVariables=1

[background]
Meter=Image
ImageName=#@#bg.png 
X=0
Y=0

[Header]
Meter=Image
ImageName=#@#header.png 
X=395
Y=2
W=15
H=260
DynamicVariables=1

[glass]
Meter=Image
Group=Sliders
ImageName=#@#glass.png 
X=(398 + #Offset#)
Y=17
W=150	
H=260
DynamicVariables=1
hidden=0
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 7144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Sliding image

balala » March 11th, 2018, 2:49 pm

jsmorley wrote:Still not obvious to me what effect you are looking for. Please be clear...
eclectic-tech wrote:If we misunderstood, then a precise step by step (spoon-feed-me) explanation would help.
Definitely not very clear, however this is what I understood: now the images moves to right when clicked, then stops. On a new click it moves back to its initial position, to left. Am I right if I think the images should have to go to right, then without a new click it should have to move back to left, immediately after it stops on the rightist position?
xenium
Posts: 306
Joined: January 4th, 2018, 9:52 pm

Re: Sliding image

xenium » March 11th, 2018, 3:03 pm

eclectic-tech wrote:From your description, this seems to be what you want this (click to animate):glass.gifYou are trying to move multiple images, when it is simpler to set them relatively and just move one of them. The code below will give you the above action.

If we misunderstood, then a precise step by step (spoon-feed-me) explanation would help.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Sliders][!Redraw]
W=1
Offset=-150
SlideAmount=10
RightOffset=205

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Right,#W#,20
; | Wait 1 | HeaderOut
ActionList2=Repeat Left,#W#,20
; | Wait 1 | HeaderIn
Right=[!SetVariable Offset "(Clamp(#Offset#+#SlideAmount#,-150,0))"]#U#
HeaderOut=[!SetOption Header ImageName "header.png "]#U#
Left=[!SetVariable Offset "(Clamp(#Offset#-#SlideAmount#,-150,0))"]#U#
HeaderIn=[!SetOption Header ImageName "header.png "]#U#
IfCondition=#Offset# = -150
IfTrueAction=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]"""]
IfCondition2=#Offset# = 0
IfTrueAction2=[!SetOption Header LeftMouseUpAction """[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]"""]
DynamicVariables=1

[background]
Meter=Image
ImageName=#@#bg.png 
X=0
Y=0

[glass]
Meter=Image
Group=Sliders
ImageName=#@#glass.png 
X=(398 + #Offset#)
Y=17
W=150	
H=260
DynamicVariables=1
hidden=0

[Header]
Meter=Image
ImageName=#@#header.png 
X=R
;(545 + #Offset#)
Y=2
W=15
H=260
DynamicVariables=1

hidden=0
It's exactly what I wanted.Thank you so much
Sorry if he did not understand what I wanted, my English expression is to blame
One more question is: when the slide is back to the left, this can be hidden in the end, not see through the other? Or if they are transparent can not?