VCV Rack API v2
Loading...
Searching...
No Matches
Label.hpp
Go to the documentation of this file.
1#pragma once
2#include <widget/Widget.hpp>
3#include <ui/common.hpp>
4
5
6namespace rack {
7namespace ui {
8
9
11 enum Alignment {
15 };
16
17 std::string text;
18 float fontSize;
20 NVGcolor color;
22
24 void draw(const DrawArgs& args) override;
25};
26
27
28} // namespace ui
29} // namespace rack
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Definition Label.hpp:10
Alignment alignment
Definition Label.hpp:21
Alignment
Definition Label.hpp:11
@ LEFT_ALIGNMENT
Definition Label.hpp:12
@ CENTER_ALIGNMENT
Definition Label.hpp:13
@ RIGHT_ALIGNMENT
Definition Label.hpp:14
std::string text
Definition Label.hpp:17
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
float fontSize
Definition Label.hpp:18
NVGcolor color
Definition Label.hpp:20
float lineHeight
Definition Label.hpp:19
Definition Widget.hpp:141
A node in the 2D scene graph.
Definition Widget.hpp:21