It is currently April 18th, 2024, 1:40 am

Unfold movement

Get help with creating, editing & fixing problems with skins
Blasphemous

Unfold movement

Post by Blasphemous »

Hey guys, I needed some help with a rainmeter skin. I use the skin unfold and as you used will be aware the apps move along the X axis when the mouse hovers over it, however I would like to know if it's possible to have move along the Y axis with a few changes in the code?
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unfold movement

Post by balala »

Blasphemous wrote: ↑May 19th, 2021, 11:39 am I use the skin unfold and as you used will be aware the apps move along the X axis when the mouse hovers over it, however I would like to know if it's possible to have move along the Y axis with a few changes in the code?
It definitely is. You have to replace a few options. I worked in the unFold\Edge\Black\Edge.ini skin, but you definitely can do the same changes on any other skin of the package.
Here are the rewritten options:

Code: Select all

[Rainmeter]
Update=1000

...

[Variables]
Y1=-45
...

[Edge]
...
H=50
Y=#Y1#
...

[MeasureSlide]
...
Left=[!SetVariable Y1 "(Clamp(#Y1#-5,-45,0))"]#U#
...
Right=[!SetVariable Y1 "(Clamp(#Y1#+5,-45,0))"]#U#
...
There is one disadvantage: when the icon is "closed" you gonna see one single tiny 5 pixels height black line and you have to hover the mouse over that, in order to reveal the icon.
Please test the above modifications of the code to see if it meats your need and let me know. Some further improvements are still possible.
Blasphemous

Re: Unfold movement

Post by Blasphemous »

Thanks for your reply, the problem is when I make the changes the application disappears like totally out, I even tried changing the cords but I still can't find it
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unfold movement

Post by balala »

Blasphemous wrote: ↑May 19th, 2021, 4:26 pm Thanks for your reply, the problem is when I make the changes the application disappears like totally out, I even tried changing the cords but I still can't find it
As said twhat remains is extremely tiny and black. If the backround (or the part of desktop where the skin is) is black, you can't see it. In such a case try adding the following options to the [Rainmeter] section, but this adds a 200 x 45 black rectange to the skin, which makes it weird, but at least you can see where the skin is:

Code: Select all

[Rainmeter]
...
BackgroundMode=2
Solidcolor=255,255,255,100
SkinHeight=50
Don't forget to refresh.
Blasphemous

Re: Unfold movement

Post by Blasphemous »

Ya I refreshed it however it was disappearing after I made the changes and hit refresh, I'll do one thing I'll attach the code and if you don't mind can you tell me what's wrong with it?, also I made the change you told me in the last reply and it didn't disappear though but the animation totally stopped, guess I am missing something out somewhere

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=255, 255, 255, 100
SkinHeight=50

[Metadata]
Name=unFold
Author=
Version=
License=
Information=

[Variables]
Y1=-45
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[Ppssppleft]
Meter=Image
Group=Items
ImageName=Ppsspp.png
H=50
Y=#Y1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["C:\Program Files\PPSSPP\PPSSPPWindows64.exe"]
RightMouseDownAction=[!Update]

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable Y1 "(Clamp(#Offset#-5,-45,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable Y1 "(Clamp(#Offset#+5,-45,0))"]#U#
DynamicVariables=1
Also, sorry I am asking so much helpπŸ˜…πŸ˜…πŸ˜…
Last edited by balala on May 19th, 2021, 7:48 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unfold movement

Post by balala »

Blasphemous wrote: ↑May 19th, 2021, 7:31 pm I'll do one thing I'll attach the code and if you don't mind can you tell me what's wrong with it?,
I suppose you're working with a different skin than the one I've been working with. Make sure the image ised into the ImageName option of the [Ppssppleft] meter does exist. Does it? I suppose it doesn't and if I'm right, this is why there is nothing shown up.
Blasphemous wrote: ↑May 19th, 2021, 7:31 pm also I made the change you told me in the last reply and it didn't disappear though but the animation totally stopped, guess I am missing something out somewhere
Yes, the problem is that you've replaced the #Y1# variable in the Left and Right options of the [MeasureSlider] measure with #Offset#, so now the variable set with the !SetVariable bangs and the one used into the Clamp functions have nothing to do with each other. Replace back #Offset# with #Y1#:

Code: Select all

[MeasureSlider]
...
Left=[!SetVariable Y1 "(Clamp(#Y1#-5,-45,0))"]#U#
...
Right=[!SetVariable Y1 "(Clamp(#Y1#+5,-45,0))"]#U#
...
Blasphemous wrote: ↑May 19th, 2021, 7:31 pm Also, sorry I am asking so much helpπŸ˜…πŸ˜…πŸ˜…
No, you're not. This being a completely free forum, you can ask as much as want and someone here will reply only if and when has time. So don't worry, just ask whenever questions arise...
Blasphemous

Re: Unfold movement

Post by Blasphemous »

It works perfectly, thank you for you help :) :)
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unfold movement

Post by balala »

Blasphemous wrote: ↑May 20th, 2021, 7:08 am It works perfectly, thank you for you help :) :)
Great! :great:
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unfold movement

Post by balala »

I rewrote once again the code, in order to get it better looking. Here is what I got. Note that this will look alright, only if the structure of the Ppsspp.png image is the same as the structure of the images included into the unFold package, with the icon on right and the name of the element on left. Now when the skin is activated / refreshed, you get the icon and on mouse hovering, the name is revealed.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0
MouseOverAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]

[Metadata]
Name=unFold
Author=
Version=
License=
Information=

[Variables]
Y1=-50
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[Ppssppleft]
Meter=Image
Group=Items
ImageName=Ppsspp.png
W=150
H=50
PreserveAspectRatio=1
Y=#Y1#
DynamicVariables=1
ImageCrop=0,0,600,200
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["C:\Program Files\PPSSPP\PPSSPPWindows64.exe"]
RightMouseDownAction=[!Update]

[Ppssppleft2]
Meter=Image
Group=Items
ImageName=Ppsspp.png
W=150
H=50
PreserveAspectRatio=1
Y=0R
DynamicVariables=1
ImageCrop=600,0,200,200
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["C:\Program Files\PPSSPP\PPSSPPWindows64.exe"]
RightMouseDownAction=[!Update]

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable Y1 "(Clamp(#Y1#-5,-50,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable Y1 "(Clamp(#Y1#+5,-50,0))"]#U#
DynamicVariables=1
Note that I added a new Image meter ([Ppssppleft2]) and moved the MouseOverAction and MouseLeaveAction options from the [Ppssppleft] meter to the [Rainmeter] section, because now being there two meters, this causes some trouble if the options are kept on the meter(s).
Please let me know if this does work well for you.