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.
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.
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 . . .
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...
"Regrettably your planet is one of those scheduled for demolition"
Mike
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.
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.
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