12#define DEFAULT_LABEL_STRING_LENGTH 50
13#define LABEL_COLOR_NOTSET RGB565(0x2B, 0x23, 0x10)
52 virtual void Draw(
bool redraw)
override;
#define DEFAULT_LABEL_STRING_LENGTH
Default string length for a label.
Definition Label.h:12
#define LABEL_COLOR_NOTSET
Define one color that is used to indicate that the user doesn't set the color.
Definition Label.h:13
Containing a class that is used to handle the drawing and key handling of all UI_Elements.
Containing the abstract base class for all user interface elements (controls, indicators,...
virtual void RecalculateDimensions() override
Recalculate the Height and Width of the UIElement.
Definition Label.cpp:67
~Label()
Destructor of the Label.
Definition Label.h:43
const GFXfont * _font
Font that is used to draw the Label.
Definition Label.h:22
Label(const char *text, uint16_t color=LABEL_COLOR_NOTSET, const GFXfont *font=NULL, uint16_t locX=0, uint16_t locY=0, uint16_t maxStringLength=DEFAULT_LABEL_STRING_LENGTH)
Constructor of the Label.
Definition Label.cpp:8
void SetText(const char *text)
Change the string that is drawn to the screen by this Label.
Definition Label.cpp:60
virtual void Draw(bool redraw) override
Method used for drawing of the Label.
Definition Label.cpp:17
char * Text
Character buffer holding the string drawn by the Label.
Definition Label.h:26
bool WasTextChangedSinceLastDraw
Flag indicating if the Text was changed since the last draw.
Definition Label.h:27
uint16_t _color
Text color that is used to draw the Label.
Definition Label.h:23
uint16_t _maxStringLength
Maximum string length that the Label can hold.
Definition Label.h:21
UIElement(UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:43