It is currently March 29th, 2024, 12:37 pm

Making icons that start from the right

Get help with installing and using Rainmeter.
pr0x1ma

Making icons that start from the right

Post by pr0x1ma »

I am using this https://www.deviantart.com/devilrev/art/unFold-A-Launcher-618503449 :welcome:
all Icons are on the left. I want to make some icons on the right side too... how do I do it?
I think i'd be making new icons but i don't know how to "change"/"add" the codes.

i think its possible because i saw a "configuration" from another user.
Image
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making icons that start from the right

Post by balala »

pr0x1ma wrote: November 9th, 2018, 3:40 am I am using this https://www.deviantart.com/devilrev/art/unFold-A-Launcher-618503449 :welcome:
all Icons are on the left. I want to make some icons on the right side too... how do I do it?
It's not too easy, because those buttons are using images, even the texts are written to the images. Because of this, if you put the buttons on the right side of the screen, when you're hovering the mouse over it, the sliding in button would look weird at least. Probably it's not impossible, but nor easy isn't. A bit later I'll rewrite one example for you, to see how does it look.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making icons that start from the right

Post by balala »

balala wrote: November 9th, 2018, 2:19 pm A bit later I'll rewrite one example for you, to see how does it look.
Here is the promised code: I rewrote the code of the unFold\WMP\Black\WMP.ini skin (the skin launching Windows Media Player):

Code: Select all

[Rainmeter]
Update=-1

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[WMP]
Meter=Image
Group=Items
ImageName=#@#Buttons\Black\WMP.png
H=50
X=(#SCREENAREAWIDTH#-#X1#-200)
ImageCrop=600,0,200,200
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
LeftMouseDownAction=[!SetOption WMP ImageAlpha "150"][!SetOption WMPString SolidColor "0,0,0,150"][!Update]
LeftMouseUpAction=[!SetOption WMP ImageAlpha "255"][!SetOption WMPString SolidColor "0,0,0"][!Update]["C:\Program Files (x86)\Windows Media Player\wmplayer.exe"]
RightMouseDownAction=[!Update]

[WMPString]
Meter=STRING
X=75R
Y=25r
W=150
H=50
FontColor=220,220,220
SolidColor=0,0,0
FontSize=18
FontFace=Segoe UI
StringAlign=CenterCenter
AntiAlias=1
Text=WMP
Group=Items
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
LeftMouseDownAction=[!SetOption WMP ImageAlpha "150"][!SetOption WMPString SolidColor "0,0,0,150"][!Update]
LeftMouseUpAction=[!SetOption WMP ImageAlpha "255"][!SetOption WMPString SolidColor "0,0,0"][!Update]["C:\Program Files (x86)\Windows Media Player\wmplayer.exe"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
Note the followings:
  • I cropped the used image, through the ImageCrop option, added to the [WMP] meter. I had to do this, to remove the WMP string, placed in front of the icon, because if the button slides from right, not from left (as it did), the string should have to be in the right side of the icon.
  • Due to removing the string from the image, I had to add a String meter (named it [WMPString]), after the icon. These two meters are positioned relatively.
  • I had to modify the X option of the Image meter, to make it to slide out not from left, but from right.
  • I also modified the Update value of the skin, using Update=-1 ([Rainmeter] section), which means the skin never updates. These mouse controlled skins don't need to be updated. If there is any issue with this, change back the Update to the default Update=1000 (but I hope there won't be).
If you're making the same modifications, probably any skin of that package can be rewritten similarly. Please test the above code and let me know how does it work. If there is any issue with any of those codes, please let me know as well.
Kraha
Posts: 11
Joined: November 9th, 2018, 9:26 pm

Re: Making icons that start from the right

Post by Kraha »

I have got the same problem with this unfold right side icons. Obviously cannot fix it. Your code is good, but still gotta problem, I mean we need to use text and background. The question is how it can work without this? I mean without 'string' things. because if i gonna make my own icon it will be destroyed by this code. I was try code which i find on deviantart, but it was crashing and i cannot fix it. i place code below, that was make me working but not at all. Is here any idea how to make it working from right to left? Anyone?

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=200
SkinHeight=50

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
OffSet=130
State=1
U=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]


[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideLeft, 5, 30
SlideLeft=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#-5,0,130))"]#U#
ActionList2=Repeat SlideRight, 5, 30
SlideRight=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#+5,0,130))"]#U#
DynamicVariables=1

[MeterBack]
Meter=Image
X=#OffSet#
W=200
H=50
ImageName=#@#Buttons\White\Word.png
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlider "Execute #State#"]
MouseLeaveAction=[!CommandMeasure MeasureSlider "Execute #State#"]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE"]
How to do it working as i talk about? Because i want to make my own icons with transparent background.

Edit: I was edit code you prepare for transparent background but it isn't still that what i want and with this is gotta problem that icon image isnt solid.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making icons that start from the right

Post by balala »

Kraha wrote: November 9th, 2018, 9:41 pm I was try code which i find on deviantart, but it was crashing and i cannot fix it.
The posted code works for me, no issues at all. What is crashing for you?
Kraha
Posts: 11
Joined: November 9th, 2018, 9:26 pm

Re: Making icons that start from the right

Post by Kraha »

The icon after unselect it dont go back "out of desktop" if you know what i mean or sometimes stock in half of back-way or if i place two icons near themself, they crashing with this things or icon stay on desktop fully uncovered. You know what i mean at all? that was working for me for a lil time, then crash again, so what i can make to working it?
Kraha
Posts: 11
Joined: November 9th, 2018, 9:26 pm

Re: Making icons that start from the right

Post by Kraha »

I find an issue, i mean code that is working well for me and i can also change icon file as i want to. Down i put the code that is working well for me.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=200
SkinHeight=50

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[##]
Meter=Image
Group=Items
ImageName=#@#Buttons\Own\#ICON.PNG#
W=200
H=50
X=#X1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["#ICON PATH#"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,0,150))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,0,150))"]#U#
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making icons that start from the right

Post by balala »

I'm not sure I completely understand: now the code does or does not work for you?
Related to the last posted code, I'd fix a few details first:
  • I wouldn't use a meter name like [##]. Although it's not denied to be used, nor a good idea isn't. Use a name composed by letters / digits.
  • The code doesn't contain the values of the used variables (like ICON.PNG, ICON PATH and so on) and nor an @Include option doesn't have, to have them defined into another, included file. So, where are they defined?
  • Again isn't a good idea to have spaces into the names of variables (I'm talking about the ICON PATH variable). Although not completely denied, nor a good idea isn't (again!). Use names without spaces.
Now, please fix these things, then I'm waiting for some details.
Kraha
Posts: 11
Joined: November 9th, 2018, 9:26 pm

Re: Making icons that start from the right

Post by Kraha »

This code if working. About "##" things that you are talking about. I was prepare this and then putting this code to all folders with prepared icons things. So this is just info for me (or for others that will use it maybe) where is the place (line) where needed is to paste icon path and program path (yea, i see my mistake). But at all after full of edit it's working well. Solved.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making icons that start from the right

Post by balala »

Kraha wrote: November 10th, 2018, 11:20 pm This code if working. About "##" things that you are talking about. I was prepare this and then putting this code to all folders with prepared icons things. So this is just info for me (or for others that will use it maybe) where is the place (line) where needed is to paste icon path and program path (yea, i see my mistake). But at all after full of edit it's working well. Solved.
I'm glad. :great:
However as I said you can use both the section names using special characters and spaces into variable names (as well as in section names), but this isn't a good idea and on long term can cause a lot of headaches.