You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
557B

  1. #pragma once
  2. #include <cstdint>
  3. #include "asset.hpp"
  4. #include "rack.hpp"
  5. using namespace rack;
  6. #define plugin "SynthKit"
  7. struct RCSlider : SVGFader {
  8. RCSlider() {
  9. Vec margin = Vec(4, 4);
  10. maxHandlePos = Vec(1.3, -7).plus(margin);
  11. minHandlePos = Vec(1.3, 79).plus(margin);
  12. background->svg = SVG::load(assetPlugin(plugin,"res/Slider.svg"));
  13. background->wrap();
  14. background->box.pos = margin;
  15. box.size = background->box.size.plus(margin.mult(2));
  16. handle->svg = SVG::load(assetPlugin(plugin,"res/SliderHandle.svg"));
  17. handle->wrap();
  18. }
  19. };