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.

45 lines
929B

  1. #pragma once
  2. #include <app/common.hpp>
  3. #include <widget/Widget.hpp>
  4. #include <widget/OpaqueWidget.hpp>
  5. #include <ui/TextField.hpp>
  6. namespace rack {
  7. namespace app {
  8. struct LedDisplay : widget::OpaqueWidget {
  9. void draw(const DrawArgs& args) override;
  10. };
  11. struct LedDisplaySeparator : widget::Widget {
  12. LedDisplaySeparator();
  13. void draw(const DrawArgs& args) override;
  14. };
  15. struct LedDisplayChoice : widget::OpaqueWidget {
  16. std::string text;
  17. std::string fontPath;
  18. math::Vec textOffset;
  19. NVGcolor color;
  20. NVGcolor bgColor;
  21. LedDisplayChoice();
  22. void draw(const DrawArgs& args) override;
  23. void onButton(const ButtonEvent& e) override;
  24. };
  25. struct LedDisplayTextField : ui::TextField {
  26. std::string fontPath;
  27. math::Vec textOffset;
  28. NVGcolor color;
  29. NVGcolor bgColor;
  30. LedDisplayTextField();
  31. void draw(const DrawArgs& args) override;
  32. int getTextPosition(math::Vec mousePos) override;
  33. };
  34. } // namespace app
  35. } // namespace rack