balala wrote: ↑March 11th, 2021, 8:27 pm
Have to test a few things in order to get this working as expected. Today probably I won't come back with a reliable solution, but tomorrow will try to figure out how to do. Stay tuned...
And finally here is the code. I rewrote a few things. For instance I had to move the Up and Down buttons outside of the background, because if they stay inside, there is a problem when clicking to them (in such a case which click should apply: the one related to the [MeterVolUp] / [MeterVolDown] meter, or the one related to the newlly added meter?).
Please take a look to this code, test it and let me know if it looks like what you want.
Code: Select all
[Rainmeter]
Update=1000
MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume #Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
BackgroundMode=1
AccurateText=1
@Include=#@#BaseBubble.inc
Group=SYS_Bubbles
[Variables]
Sound=C:\Users\spost\Documents\Rainmeter\Pot sounds\deduction-588.wav
Step=2
@IncludeVars=#@#SharedVars.inc
Radius=35
[MyStringStyle]
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
DynamicVariables=1
[StringStyle]
Meter=Shape
MeterStyle=styleGaugeBackMedium
X=40
Y=50
AntiAlias=1
DynamicVariables=1
[ShapeStyle]
X=[StringStyle:X]
Y=[StringStyle:Y]
Shape=Path MyPath | Extend MyModifiers1
MyModifiers1=Fill Color 0,0,0,1 | StrokeWidth 0 | Stroke Color 0,0,0,0
[MeasureWin7Audio]
Measure=Plugin
Plugin=Win7AudioPlugin
[MeterVolUp]
Meter=STRING
MeterStyle=MyStringStyle
X=40
Y=10
Text=[\x2206]
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume #Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[MeterVolLevel]
Meter=STRING
MeterStyle=MyStringStyle
X=0r
Y=(#Radius#+5)r
Text=[MeasureWin7Audio:]%
LeftMouseUpAction=[Play "#Sound#"]
[MeterVolDown]
Meter=STRING
MeterStyle=MyStringStyle
X=0r
Y=(#Radius#+5)r
Text=[\x2207]
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[0]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 0"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[1]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 9"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[2]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 18"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[3]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 27"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[4]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 36"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[5]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 45"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[6]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 55"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[7]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 64"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[8]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 73"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[9]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 82"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[10]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 90"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
[11]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 100"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]