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.

27 lines
358B

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