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.

21 lines
484B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "app/ParamWidget.hpp"
  4. namespace rack {
  5. /** A switch that is turned on when held and turned off when released.
  6. Consider using SVGButton if the switch simply changes the state of your Module when clicked.
  7. */
  8. struct MomentarySwitch : virtual ParamWidget {
  9. /** Don't randomize state */
  10. void randomize() override {}
  11. void onDragStart(event::DragStart &e) override;
  12. void onDragEnd(event::DragEnd &e) override;
  13. };
  14. } // namespace rack