hi guys,
I have made a new LookandFeel class because I need one rotary slider that has 12 positions and needs to turn from 0-330 degrees in 30 degree steps.
Can you guys help me where I need to change the new reach of the slider? I think the standard is 270 degrees.
This is my class:
class OtherLookAndFeel2 : public LookAndFeel_V4
{
public:
OtherLookAndFeel2()
{
setColour (Slider::thumbColourId, Colours::red);
}
void drawRotarySlider (Graphics& g, int x, int y, int width, int height, float sliderPos,
const float rotaryStartAngle, const float rotaryEndAngle, Slider&) override
{
auto radius = jmin (width / 2, height / 2) - 15.0f;
auto centreX = x + width * 0.5f;
auto centreY = y + height * 0.5f;
auto rx = centreX - radius;
auto ry = centreY - radius;
auto rw = radius * 2.0f;
auto angle = rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle);
// fill
g.setColour (Colours::blue);
g.fillEllipse (rx, ry, rw, rw);
// outline
g.setColour (Colours::blue);
g.drawEllipse (rx, ry, rw, rw, 1.0f);
Path p;
auto pointerLength = radius;
auto pointerThickness = 3.0f;
p.addRectangle (-pointerThickness * 0.5f, -radius, pointerThickness, pointerLength);
p.applyTransform (AffineTransform::rotation (angle).translated (centreX, centreY));
// pointer
g.setColour (Colours::white);
g.fillPath (p);
}
};
And I use this in my code:
dial2.setBounds (400,187,100,100);
Please help! 
