It is currently March 29th, 2024, 4:48 am

How can i make this volume bar skin work vertically

Get help with creating, editing & fixing problems with skins
roymillerxxx
Posts: 3
Joined: November 10th, 2021, 8:43 am

How can i make this volume bar skin work vertically

Post by roymillerxxx »

How can I make this volume bar skin work vertically (going upwards) ?

Code: Select all

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

[Variables]
BarBGW=110
BarH=16
VolumeIncrement=5

[MeasurePlayer]
Measure=Plugin
Plugin=Win7AudioPlugin.dll
MinValue=0
MaxValue=100

[MeasureVolume%]
Measure=Calc
Formula=MeasurePlayer
MinValue=0
MaxValue=100
UpdateDivider=1

[MeasureSetVolumeLevel]
Measure=Calc
Formula=#VolumeLevel#
DynamicVariables=1

[MeterBarShape]
Meter=Shape
Shape=Rectangle 1,11,#BarBGW#,#BarH#,7 |  Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,55,204,255
Shape2=Rectangle 4,14,([MeasureVolume%:%]*104/100),10,5 | Fill Color 51,204,255,255 | StrokeWidth 0
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "ChangeVolume -#VolumeIncrement#"][!Update]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "ChangeVolume +#VolumeIncrement#"][!Update]
DynamicVariables=1

[PercentageBG]
Meter=Shape
Shape=Rectangle 120,7,38,24,11 | Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,204,55,255

[VolumePercentage]
Meter=String
X=139
Y=3
FontSize=11
FontWeight=600
FontFace=Comic Sans MS
FontColor=255,255,255,255
StringAlign=Center
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=[MeasureVolume%]
2021-11-21 15_12_30-Untitled - Paint.png
Rainmeter 4.5.5.3565 (64-bit)
Language: English (1033)
Build time: 2021-11-17 7:14:43
Windows 10 Pro 2009 64-bit (build 19043) - English (1033)

Sorry for my bad English :(
You do not have the required permissions to view the files attached to this post.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: How can i make this volume bar skin work vertically

Post by CodeCode »

Ok. There is actually not much to change, really.
It might be confusing though.

The shape meters are defined by the type of shape. These look like rectangles.

Shape=Rectangle start X,start Y,Width,height,corners round(optional but used in your example)

Code: Select all

[BorderStyle]
Meter=Shape
Shape=Rectangle 0,0,418,30,14 | Fill Color 20,20,20,255 | StrokeWidth 1 | Stroke Color 159,105,10,255
Lots more here
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How can i make this volume bar skin work vertically

Post by eclectic-tech »

You also need to change the vertical position along with height of the volume indicator shape and the location of the volume number background and text.

Something like this:

Code: Select all

[MeterBarShape]
Meter=Shape
Shape=Rectangle 1,11,#BarH#,#BarBGW#,7 |  Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,55,204,255
Shape2=Rectangle 4,(118-([MeasureVolume%:%]*104/100)),10,([MeasureVolume%:%]*104/100),5 | Fill Color 51,204,255,255 | StrokeWidth 0
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "ChangeVolume -#VolumeIncrement#"][!Update]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "ChangeVolume +#VolumeIncrement#"][!Update]
DynamicVariables=1

[PercentageBG]
Meter=Shape
Shape=Rectangle 24,96,38,24,11 | Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,204,55,255

[VolumePercentage]
Meter=String
X=42
Y=108
FontSize=11
FontWeight=600
FontFace=Comic Sans MS
FontColor=255,255,255,255
StringAlign=CenterCenter
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=[MeasureVolume%]
volvert.png
You do not have the required permissions to view the files attached to this post.
roymillerxxx
Posts: 3
Joined: November 10th, 2021, 8:43 am

Re: How can i make this volume bar skin work vertically

Post by roymillerxxx »

Thank You so much :)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How can i make this volume bar skin work vertically

Post by eclectic-tech »

Happy to help. Vertical changing shape meters can be tricky to figure, so I hope this gives you a start :)
roymillerxxx
Posts: 3
Joined: November 10th, 2021, 8:43 am

Re: How can i make this volume bar skin work vertically

Post by roymillerxxx »

at first I tried changing W and H and it worked but it was going downwards (top to bottom) but i wanted it to go upwards
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How can i make this volume bar skin work vertically

Post by eclectic-tech »

roymillerxxx wrote: November 23rd, 2021, 8:15 am at first I tried changing W and H and it worked but it was going downwards (top to bottom) but i wanted it to go upwards
Look at the Shape2=... line in the code above. That is where the changes are made to the initial vertical position of the volume indicator.
If you replace those 3 sections in your code it will go from the bottom up.

Making the shape expand upward is the tricky part I mentioned.

Here is your entire code with those changes

Code: Select all

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

[Variables]
BarBGW=110
BarH=16
VolumeIncrement=5

[MeasurePlayer]
Measure=Plugin
Plugin=Win7AudioPlugin.dll
MinValue=0
MaxValue=100

[MeasureVolume%]
Measure=Calc
Formula=MeasurePlayer
MinValue=0
MaxValue=100
UpdateDivider=1

[MeasureSetVolumeLevel]
Measure=Calc
Formula=#VolumeLevel#
DynamicVariables=1

[MeterBarShape]
Meter=Shape
Shape=Rectangle 1,11,#BarH#,#BarBGW#,7 |  Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,55,204,255
Shape2=Rectangle 4,(118-([MeasureVolume%:%]*104/100)),10,(([MeasureVolume%:%]*104/100)),5 | Fill Color 51,204,255,255 | StrokeWidth 0
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "ChangeVolume -#VolumeIncrement#"][!Update]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "ChangeVolume +#VolumeIncrement#"][!Update]
DynamicVariables=1

[PercentageBG]
Meter=Shape
Shape=Rectangle 24,96,38,24,11 | Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,204,55,255

[VolumePercentage]
Meter=String
X=42
Y=108
FontSize=11
FontWeight=600
FontFace=Comic Sans MS
FontColor=255,255,255,255
StringAlign=CenterCenter
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=[MeasureVolume%]