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.

41 lines
867B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widgets/Widget.hpp"
  4. #include "widgets/TransparentWidget.hpp"
  5. #include "ui/TextField.hpp"
  6. namespace rack {
  7. struct LedDisplay : Widget {
  8. void draw(const DrawContext &ctx) override;
  9. };
  10. struct LedDisplaySeparator : TransparentWidget {
  11. LedDisplaySeparator();
  12. void draw(const DrawContext &ctx) override;
  13. };
  14. struct LedDisplayChoice : TransparentWidget {
  15. std::string text;
  16. std::shared_ptr<Font> font;
  17. math::Vec textOffset;
  18. NVGcolor color;
  19. LedDisplayChoice();
  20. void draw(const DrawContext &ctx) override;
  21. void onButton(const event::Button &e) override;
  22. };
  23. struct LedDisplayTextField : TextField {
  24. std::shared_ptr<Font> font;
  25. math::Vec textOffset;
  26. NVGcolor color;
  27. LedDisplayTextField();
  28. void draw(const DrawContext &ctx) override;
  29. int getTextPosition(math::Vec mousePos) override;
  30. };
  31. } // namespace rack