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.

44 lines
924B

  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::shared_ptr<Font> font;
  18. math::Vec textOffset;
  19. NVGcolor color;
  20. NVGcolor bgColor;
  21. LedDisplayChoice();
  22. void draw(const DrawArgs &args) override;
  23. void onButton(const event::Button &e) override;
  24. };
  25. struct LedDisplayTextField : ui::TextField {
  26. std::shared_ptr<Font> font;
  27. math::Vec textOffset;
  28. NVGcolor color;
  29. LedDisplayTextField();
  30. void draw(const DrawArgs &args) override;
  31. int getTextPosition(math::Vec mousePos) override;
  32. };
  33. } // namespace app
  34. } // namespace rack