It is currently March 28th, 2024, 7:14 pm
Anyway to make a clickable progress bar?
-
- Posts: 5
- Joined: January 7th, 2020, 11:51 am
Anyway to make a clickable progress bar?
I made a skin for Audio playback and want to make a progress bar that not only moves for the duration but where I can click to scrub through the song.
-
- Posts: 908
- Joined: December 30th, 2015, 9:47 am
Re: Anyway to make a clickable progress bar?
It can be achieved using Mouse variable and CommandMeasure to the NowPlaying measure, like this;
Code: Select all
[mPlayer]
Measure=NowPlaying
PlayerName=(your player name)
PlayerType=Title
[PlaybackBarBackground]
Meter=Image
ImageName=progress.png
X=
Y=
W=
H=
LeftMouseUpAction=[!CommandMeasure mPlayer "SetPosition $MouseX:%$"]
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Anyway to make a clickable progress bar?
Having this react to clicking is doable, as noted above, and I might suggest that mouse wheel scrolling might be a good additional behavior, maybe even a better behavior.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureValue]
Measure=Calc
Formula=0
MinValue=0
MaxValue=100
[MeterBack]
Meter=Shape
Shape=Rectangle 0,0,300,20 | StrokeWidth 0 | Fill Color 69,50,40,255
MouseScrollDownAction=[!SetOption MeasureValue Formula "Clamp([MeasureValue]+5,0,100)"][!UpdateMeasure MeasureValue][!UpdateMeter MeterBar][!Redraw]
MouseScrollUpAction=[!SetOption MeasureValue Formula "Clamp([MeasureValue]-5,0,100)"][!UpdateMeasure MeasureValue][!UpdateMeter MeterBar][!Redraw]
[MeterBar]
Meter=Bar
MeasureName=MeasureValue
W=300
H=20
BarColor=232,204,134,255
BarOrientation=Horizontal
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5
- Joined: January 7th, 2020, 11:51 am
Re: Anyway to make a clickable progress bar?
The mouse wheel shows it moving but, does not change song progress I must be doing something wrong.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Anyway to make a clickable progress bar?
Works for me...
Dropkick Murphys
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasurePlayer]
Measure=NowPlaying
PlayerName=Winamp
PlayerType=Progress
[MeterBack]
Meter=Shape
Shape=Rectangle 0,0,300,20 | StrokeWidth 0 | Fill Color 69,50,40,255
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "SetPosition +5"][!UpdateMeasure MeasurePlayer][!UpdateMeter MeterBar][!Redraw]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "SetPosition -5"][!UpdateMeasure MeasurePlayer][!UpdateMeter MeterBar][!Redraw]
[MeterBar]
Meter=Bar
MeasureName=MeasurePlayer
W=300
H=20
BarColor=232,204,134,255
BarOrientation=Horizontal
-
- Posts: 5
- Joined: January 7th, 2020, 11:51 am
Re: Anyway to make a clickable progress bar?
Thanks for all the help I'm super dense I got it working but, now I don't see the progress bar move but it scrubs I'm a mess.
-
- Posts: 5
- Joined: January 7th, 2020, 11:51 am
Re: Anyway to make a clickable progress bar?
Everything works fine now I was just making errors (as expected) sorry you had to deal with that and thanks.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Anyway to make a clickable progress bar?
Not to worry, glad to help.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Anyway to make a clickable progress bar?
No reason why you can't have both...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasurePlayer]
Measure=NowPlaying
PlayerName=Winamp
PlayerType=Progress
[MeterBack]
Meter=Shape
Shape=Rectangle 0,0,300,20 | StrokeWidth 0 | Fill Color 69,50,40,255
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "SetPosition +5"][!UpdateMeasure MeasurePlayer][!UpdateMeter MeterBar][!Redraw]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "SetPosition -5"][!UpdateMeasure MeasurePlayer][!UpdateMeter MeterBar][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer "SetPosition $MouseX:%$"][!UpdateMeasure MeasurePlayer][!UpdateMeter MeterBar][!Redraw]
DynamicVariables=1
[MeterBar]
Meter=Bar
MeasureName=MeasurePlayer
W=300
H=20
BarColor=232,204,134,255
BarOrientation=Horizontal