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.

Label.hpp 423B

1234567891011121314151617181920212223242526272829
  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. float lineHeight;
  15. NVGcolor color;
  16. Alignment alignment = LEFT_ALIGNMENT;
  17. Label();
  18. void draw(const DrawArgs& args) override;
  19. };
  20. } // namespace ui
  21. } // namespace rack