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.

18 lines
282B

  1. #include "app.hpp"
  2. namespace rack {
  3. void ToggleSwitch::onDragStart(EventDragStart &e) {
  4. // Cycle through values
  5. // e.g. a range of [0.0, 3.0] would have modes 0, 1, 2, and 3.
  6. if (value >= maxValue)
  7. setValue(minValue);
  8. else
  9. setValue(value + 1.0);
  10. }
  11. } // namespace rack