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.

LedDisplay.hpp 835B

12345678910111213141516171819202122232425262728293031323334353637383940
  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(NVGcontext *vg) override;
  9. };
  10. struct LedDisplaySeparator : TransparentWidget {
  11. LedDisplaySeparator();
  12. void draw(NVGcontext *vg) 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(NVGcontext *vg) 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(NVGcontext *vg) override;
  29. int getTextPosition(math::Vec mousePos) override;
  30. };
  31. } // namespace rack