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.

27 lines
524B

  1. #include "rack.hpp"
  2. using namespace rack;
  3. namespace rack_plugin_rcm {
  4. struct ClockBufferItem : MenuItem {
  5. char buffer[100];
  6. PianoRollModule* module;
  7. int value;
  8. ClockBufferItem(PianoRollModule* module, int value) {
  9. this->module = module;
  10. this->value = value;
  11. snprintf(buffer, 10, "%d", value);
  12. text = buffer;
  13. if (value == module->clockDelay) {
  14. rightText = "✓";
  15. }
  16. }
  17. void onAction(EventAction &e) override {
  18. module->clockDelay = value;
  19. }
  20. };
  21. } // namespace rack_plugin_rcm