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.

66 lines
1.5KB

  1. #include "rack.hpp"
  2. using namespace rack;
  3. #define plugin "Southpole"
  4. // GUI COMPONENTS
  5. struct sp_Port : SVGPort {
  6. sp_Port() {
  7. setSVG(SVG::load(assetPlugin(plugin, "res/sp-Port20.svg")));
  8. }
  9. };
  10. struct sp_Switch : SVGSwitch, ToggleSwitch {
  11. sp_Switch() {
  12. addFrame(SVG::load(assetPlugin(plugin,"res/sp-switchv_0.svg")));
  13. addFrame(SVG::load(assetPlugin(plugin,"res/sp-switchv_1.svg")));
  14. }
  15. };
  16. struct sp_Encoder : SVGKnob {
  17. sp_Encoder() {
  18. minAngle = -0.83 * M_PI;
  19. maxAngle = 0.83 * M_PI;
  20. setSVG(SVG::load(assetPlugin(plugin, "res/sp-encoder.svg")));
  21. //sw->svg = SVG::load(assetPlugin(plugin, "res/sp-encoder.svg"));
  22. //sw->wrap();
  23. //box.size = sw->box.size;
  24. }
  25. };
  26. struct sp_BlackKnob : SVGKnob {
  27. sp_BlackKnob() {
  28. minAngle = -0.83 * M_PI;
  29. maxAngle = 0.83 * M_PI;
  30. setSVG(SVG::load(assetPlugin(plugin, "res/sp-knobBlack.svg")));
  31. //sw->svg = SVG::load(assetPlugin(plugin, "res/sp-knobBlack.svg"));
  32. //sw->wrap();
  33. //box.size = Vec(32,32);
  34. }
  35. };
  36. struct sp_SmallBlackKnob : SVGKnob {
  37. sp_SmallBlackKnob() {
  38. minAngle = -0.83 * M_PI;
  39. maxAngle = 0.83 * M_PI;
  40. setSVG(SVG::load(assetPlugin(plugin, "res/sp-knobBlack.svg")));
  41. //sw->svg = SVG::load(assetPlugin(plugin, "res/sp-knobBlack.svg"));
  42. //sw->wrap();
  43. //box.size = Vec(20,20);
  44. }
  45. };
  46. struct sp_Trimpot : SVGKnob {
  47. sp_Trimpot() {
  48. minAngle = -0.83 * M_PI;
  49. maxAngle = 0.83 * M_PI;
  50. setSVG(SVG::load(assetPlugin(plugin, "res/sp-trimpotBlack.svg")));
  51. //sw->svg = SVG::load(assetPlugin(plugin, "res/sp-knobBlack.svg"));
  52. //sw->wrap();
  53. //box.size = Vec(18,18);
  54. }
  55. };