The new UI components


#1

I like the new rotary slider and vertical slider! and especially that it can be set very precise, independent of it’s size. the only thing is that my mouse cursor ends up somewhere on the screen far away from the actual slider. in other software this is solved by hiding the mousecursor on mousedown and reappearing it on mouse up at the position of the slider knob. this would make the slider perfect ;-D

And to move the rotary knob you have to actually make a rotary movement with the mouse. this feels very awkward because it is different from other apps that use rotary knobs where it is adjusted by simply moving the mouse up and down.

let me know what you guys think!


#2

Component::enableUnboundedMouseMovement()

and

Slider::RotaryHorizontalDrag
Slider::RotaryVerticalDrag


#3

Actually the juce demo of it works identically to other apps I have that use rotary buttons. The only figgle I have with it is when I scrolled it and my mouse went too far right, the rotary went to 0 and stayed there till I got my mouse back over to the left side of it and scrolled right and around again, all while holding mousebutton.


#4

are you talking about the same thing as the stopAtEnd parameter of setRotaryParameters() ?


#5

I have not yet looked at its code so cannot say.

This is what occurs though for me, start demo app, rotary is at 96. Click an drag it to zero, staying on the blue line itself, drag up to about 20 or so (just below the halfway point, which is no doubt what causes this), then drag straight right, it doesn’t move, until you cross to the right side, then it snaps to zero, instead of snapping to where the mouse is sitting on the blue line (well white as the blue isn’t over there)… I imagine why its going like that, but instead of having it move how the mouse moves (by default I’d imagine), might have it be placed around relative to where the mouse is to the center of the circle?


#6

I see what you mean, but it’s doing exactly what I intended it to do. If the stopAtEnd flag is true, it’ll stop when you drag in the direction of one of the ends, and that’s what you’re doing. Turn the flag off and it behaves the way you obviously want it to, but the flag’s necessary if you’re using a full 360 degree control because otherwise you can’t set it to the max/min values easily.


#7

Ah, understand, may turn it off for the demo app then as it is not full 360 degrees. :slight_smile:


#8

aaah sorry! i should have investigated a bit more ;-D

AWSOME!!!


#9

thinking about it, I’m going to make it do the unbounded mouse movement thing by default - it’s a lot easier to use that way.


#10

with the unbounded mouse movement, it appears to have a strange behaviour. the mouse cursor reappears where it would be if it had not moved pass the edge of the screen while it was invisible. however, if the movement exceeds the screen edge, the cursor reappears at the edge of the component in question (which is what is desired!). if you make a BIG adjustment that’s great, but if you make only small/medium adjustment, your cursor materialises far from the control, making for an irregular behaviour which is quite annoying!

is there any way to fix this?


#11

[quote]with the unbounded mouse movement, it appears to have a strange behaviour. the mouse cursor reappears where it would be if it had not moved pass the edge of the screen while it was invisible. however, if the movement exceeds the screen edge, the cursor reappears at the edge of the component in question (which is what is desired!). if you make a BIG adjustment that’s great, but if you make only small/medium adjustment, your cursor materialises far from the control, making for an irregular behaviour which is quite annoying!
[/quote]

I’ve sorted this out now - the next version (coming soon) will do it all nicely, leaving your mouse where you’d expect it to be.


#12

great, thanks :slight_smile:


#13