It is currently April 16th, 2024, 1:10 pm

Old Stereo 1.3.1

Media controls, music players, video and animated visualizers
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Old Stereo 1.2.2

Post by Seahorse »

The progress bar in the player uses invisible image meters lined up on top of the progress bar which allows you to jump up and down the track like Winamp does.

I want to extend this technique to the rotary volume knob I have just added by using RoundLines.
Capture.PNG
I coloured them alternately for now, so I can confirm they are in the right place, transparent once they work as intended.

The problem.

If you set the volume using the existing 10% buttons to the left, all is OK, however clicking on any of the sectors on the rotary knob take the volume to 100%. Commenting out the last meter, means it now jumps to 87%, the value of the last remaining section.

Does this mean that even though it displays an arc, the meter's 'hot spot' remains a circle regardless of what is displayed, so in essence I now have 8 circles stacked on top of one another (or just the H & W dimensions), and this will not work as intended or am I doing something wrong?

Removing H= & W= means I drive them about the screen using their centres, but then they don't work at all when clicked.

I would appreciate a steer.

Code: Select all

[MeterVolumeKnob]
Meter=ROTATOR
MeasureName=MeasureVolume
ImageName=#ROOTCONFIGPATH#Images\Knob.png
X=17R
Y=-15r
W=50
H=50
OffsetX=25
OffsetY=25
StartAngle=4.1887902
RotationAngle=4.1887902

;-----------------------------------------------------------------------------------------------
;Volume Knob Hot Zones
;-----------------------------------------------------------------------------------------------

[CalcVolumeAngle]
Measure=Calc
Formula=#VolumeAngle#

[MeterVol12]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=2.61799388
X=25r
Y=25r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=255,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 12"

[MeterVol25]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=3.14159265
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=55,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 25"

[MeterVol37]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=3.66519143
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=255,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 37"

[MeterVol50]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=4.1887902
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=55,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 50"

[MeterVol62]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=4.71238898
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=255,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 62"

[MeterVol75]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=5.23598776
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=55,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 75"

[MeterVol87]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=5.75958653
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=255,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 87"

[MeterVol100]
Meter=Roundline
MeasureName=CalcVolumeAngle
StartAngle=6.28318531
X=r
Y=r
;H=70 
;W=70
Solid=1
LineLength=35
LineStart=0
LineColor=55,255,255,175
LeftMouseUpAction=!CommandMeasure "MeasurePlayer" "SetVolume 100"
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Old Stereo 1.2.2

Post by dragonmage »

I would probably slice it up into individual image meters as I'm fairly sure the transparent areas don't register clicks.
User avatar
XANCI
Posts: 104
Joined: September 18th, 2011, 6:37 am
Location: Nanjing, China

Re: Old Stereo 1.2.2

Post by XANCI »

dragonmage wrote:I would probably slice it up into individual image meters as I'm fairly sure the transparent areas don't register clicks.
Roundline Meter act just like IMAGE Meter: a visible area surrounded by transparent area in the bounding box determine by W & H.
When there is nothing around, only visible area is clickable; when another meter's visible area is under transparent area, this part of transparent area become clickable.

In your case, the first 7 meters are under the last meter's transparent area, make them respond to last meter's mouse action.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Old Stereo 1.2.2

Post by smurfier »

A roundline does not have a container to register mouse actions unless H and W are specified, meaning that the container will always be a rectangle.

Like DragonMage said, it would probably be best to use individual image meters.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Old Stereo 1.2.2

Post by Seahorse »

Just a thought though, is the a reason why a roundline container can't have a clickable area, i.e. can this feature be added if it doesn't break something else?

I'm not trying to see the fan shape at all, just using it to make the dial clickable, so if this had worked, I would have changed all of them to transparent.

So I don't want to see the 'slices' at all. If they need to be visible to be clickable, then this approach won't work either as when I make them transparent... :vomit:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Old Stereo 1.2.2

Post by dragonmage »

Slices would work because the area you want to click would actually be visible for each meter. You are basically overlaying a copy of the knob done with eight meters each with one slice visible stacked on each other. The visible part registers the mouse click the transparent part allows you to click through to the other meters.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Old Stereo 1.2.2

Post by Seahorse »

Rough day at work, brain hurts :vomit: .

Are you saying slice up the knob graphic like pie and rotate all of them.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Old Stereo 1.2.2

Post by dragonmage »

Are you trying to make the entire knob move or just the indicator dot? I would use eight static slices of the knob image and a separate image for the indicator. Then just change the coords of the indicator based on volume level or click.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Old Stereo 1.2.2

Post by Seahorse »

The knob and dot move with the volume level already, however they simply match the volume level, not change it.

I am trying to make it work like a volume knob, i.e. when you click at 12 o'clock the knob moves there and the volume goes to 50%. Click at 4 o'clock and knob rotates and the volume goes to 100% and so on.

Hence all the fiddling about with arcs trying to make click-able areas like the progress bar's fully working transparent images which happen to be rectangles...
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Old Stereo 1.2.2

Post by dragonmage »

Ahh. Then try creating eight slices where the slice has an opacity of 1 and everything else is 0. Opacity 1 can be clicked, 0 cannot.