I did manage to do that. I was trying to make it so that it doesn't drag when you do it on the grey area, but does drag when you do it on the green bar or the red area. I hope i make sense haha. I did a seperate shape meter for that and it kind of works, but the drag is all kind of wonky.eclectic-tech wrote: ↑June 28th, 2023, 1:47 am To add a small indicator that shows the current progress and moves with the level, simply add a third shape to the [Progbar] section:barindicate.pngCode: Select all
[ProgBar] Meter=Shape X=35 Y=0 Shape=Rectangle 0,0,150,20 | Fill Color 100,100,100 | StrokeWidth 0 Shape2=Rectangle 0,0,([MeasureProgress]*1.5),20 | Fill Color 255,0,0 | StrokeWidth 0 Shape3=Rectangle (([MeasureProgress]*1.5)-2),0,4,20 | Fill Color 0,255,0 | StrokeWidth 0
It is currently May 19th, 2024, 11:33 am
Issue with music progress bar.
-
- Posts: 42
- Joined: June 30th, 2022, 1:39 pm
Re: Issue with music progress bar.
Last edited by RoseRain on June 28th, 2023, 1:58 am, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 5411
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Issue with music progress bar.
Separate the "grey" shape into a spearate shape meter; now the mouse drag and scroll actions only effect the "red" or "green" shapes.
Code: Select all
[ProgBarBack]
Meter=Shape
X=35
Y=0
Shape=Rectangle 0,0,150,20 | Fill Color 100,100,100 | StrokeWidth 0
[ProgBar]
Meter=Shape
X=35
Y=0
Shape=Rectangle 0,0,([MeasureProgress]*1.5),20 | Fill Color 255,0,0 | StrokeWidth 0
Shape2=Rectangle (([MeasureProgress]*1.5)-2),0,4,20 | Fill Color 0,255,0 | StrokeWidth 0
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
MouseScrollUpAction=[!CommandMeasure "MeasureProgress" "SetPosition +5"][!UpdateMeasure MeasureProgress][!UpdateMeter ProgBar][!Redraw]
MouseScrollDownAction=[!CommandMeasure "MeasureProgress" "SetPosition -5"][!UpdateMeasure MeasureProgress][!UpdateMeter ProgBar][!Redraw]
MouseOverAction=[!EnableMeasure "MeasurePercent"][!CommandMeasure "MeasureMouse" "Start"]
MouseLeaveAction=[!DisableMeasure "MeasurePercent"][!CommandMeasure "MeasureMouse" "Stop"]
DynamicVariables=1
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 42
- Joined: June 30th, 2022, 1:39 pm
Re: Issue with music progress bar.
eclectic-tech wrote: ↑June 28th, 2023, 1:56 am Separate the "grey" shape into a spearate shape meter; now the mouse drag and scroll actions only effect the "red" or "green" shapes.Code: Select all
[ProgBarBack] Meter=Shape X=35 Y=0 Shape=Rectangle 0,0,150,20 | Fill Color 100,100,100 | StrokeWidth 0 [ProgBar] Meter=Shape X=35 Y=0 Shape=Rectangle 0,0,([MeasureProgress]*1.5),20 | Fill Color 255,0,0 | StrokeWidth 0 Shape2=Rectangle (([MeasureProgress]*1.5)-2),0,4,20 | Fill Color 0,255,0 | StrokeWidth 0 LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"] MouseScrollUpAction=[!CommandMeasure "MeasureProgress" "SetPosition +5"][!UpdateMeasure MeasureProgress][!UpdateMeter ProgBar][!Redraw] MouseScrollDownAction=[!CommandMeasure "MeasureProgress" "SetPosition -5"][!UpdateMeasure MeasureProgress][!UpdateMeter ProgBar][!Redraw] MouseOverAction=[!EnableMeasure "MeasurePercent"][!CommandMeasure "MeasureMouse" "Start"] MouseLeaveAction=[!DisableMeasure "MeasurePercent"][!CommandMeasure "MeasureMouse" "Stop"] DynamicVariables=1
Yes, that's exactly what I did, but the drag is all wonky and the progress kind of jumps all over the place.
It doesn't do that when its in the same meter and I am trying to figure out why. it even skips back to the previous track instead of drag back. Or it skips forward when I drag back instead.
-
- Rainmeter Sage
- Posts: 5411
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Issue with music progress bar.
That is caused by the constant changing of the progress measure while dragging the mouse, not due to any meter changes; all the variable setting, measure and meter updates, and redraws, take time and may never be "smooth" in this scenario.RoseRain wrote: ↑June 28th, 2023, 1:59 am Yes, that's exactly what I did, but the drag is all wonky and the progress kind of jumps all over the place.
It doesn't do that when its in the same meter and I am trying to figure out why. it even skips back to the previous track instead of drag back. Or it skips forward when I drag back instead.
Honestly, I would abandon trying to use mouse drag to control progress and revert to your mouse-click and mouse scroll actions, which are more suited to working with progress settings. Just my opinion.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 42
- Joined: June 30th, 2022, 1:39 pm
Re: Issue with music progress bar.
I am thinking the same thing. That is probably what I will do But it doesnt work bad keeping the drag, if the shape meters are not seperate. So maybe ill keep it like that.eclectic-tech wrote: ↑June 28th, 2023, 2:14 am Honestly, I would abandon trying to use mouse drag to control progress and revert to your mouse-click and mouse scroll actions, which are more suited to working with progress settings. Just my opinion.
Thank you!
-
- Rainmeter Sage
- Posts: 7286
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Issue with music progress bar.
Well, I don't get any wonkiness or any of the issues you folks experienced, everything works perfectly and I don't need to consider abandoning the approach. The "secret"? Start simple, from scratch, adding things one step at a time, fully aware of what they do (which comes by default when writing your own code from a clean base)...
It's interesting to see how stuff is ignored when code isn't provided, then people wonder why they can't figure why this or that happens. Hint: it's not how proficient one is at coding - everybody can do it, if there is willingness.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 42
- Joined: June 30th, 2022, 1:39 pm
Re: Issue with music progress bar.
I tried it from scratch, one by one as you said. But it barely drags at all. I played around with it and it still doesn't drag properly. Sure, I don't like giving up, but I don't think I will ever make it work properly.Yincognito wrote: ↑June 28th, 2023, 3:22 pm Well, I don't get any wonkiness or any of the issues you folks experienced, everything works perfectly and I don't need to consider abandoning the approach. The "secret"? Start simple, from scratch, adding things one step at a time, fully aware of what they do (which comes by default when writing your own code from a clean base)...
ezgif.com-optimize.gif
It's interesting to see how stuff is ignored when code isn't provided, then people wonder why they can't figure why this or that happens. Hint: it's not how proficient one is at coding - everybody can do it, if there is willingness.
-
- Rainmeter Sage
- Posts: 7286
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Issue with music progress bar.
I can help you do it, by suggesting what to focus on, but you'll do the "work" - well, not that much of a work, just 100 lines of code including 15 empty lines, most of them identical to what you already have. The question is: are you interested in it? If you really don't believe in yourself or don't want this enough, feel free to refuse, but if you have the two, I guarantee success.