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
518B

  1. #pragma once
  2. #include "ui/common.hpp"
  3. #include "ui/MenuEntry.hpp"
  4. namespace rack {
  5. struct MenuSeparator : MenuEntry {
  6. MenuSeparator() {
  7. box.size.y = BND_WIDGET_HEIGHT / 2;
  8. }
  9. void draw(NVGcontext *vg) override {
  10. nvgBeginPath(vg);
  11. const float margin = 8.0;
  12. nvgMoveTo(vg, margin, box.size.y / 2.0);
  13. nvgLineTo(vg, box.size.x - margin, box.size.y / 2.0);
  14. nvgStrokeWidth(vg, 1.0);
  15. nvgStrokeColor(vg, color::alpha(bndGetTheme()->menuTheme.textColor, 0.25));
  16. nvgStroke(vg);
  17. }
  18. };
  19. } // namespace rack