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.

29 lines
404B

  1. #pragma once
  2. #include <widget/Widget.hpp>
  3. #include <ui/common.hpp>
  4. namespace rack {
  5. namespace ui {
  6. struct Label : widget::Widget {
  7. enum Alignment {
  8. LEFT_ALIGNMENT,
  9. CENTER_ALIGNMENT,
  10. RIGHT_ALIGNMENT,
  11. };
  12. std::string text;
  13. float fontSize;
  14. NVGcolor color;
  15. Alignment alignment = LEFT_ALIGNMENT;
  16. Label();
  17. void draw(const DrawArgs& args) override;
  18. };
  19. } // namespace ui
  20. } // namespace rack