ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
label.cpp
Go to the documentation of this file.
2
4
6{
7 if (!text.empty() && font != nullptr) {
9 }
10
11 Widget::draw(ctx);
12}
Vec2< T > position
The position of the rectangle.
Definition geometry.h:552
Shared state for the UI system.
Definition context.h:75
asw::Color color
The text color.
Definition label.h:47
void draw(Context &ctx) override
Draw the label.
Definition label.cpp:5
asw::Font font
The font to use for rendering.
Definition label.h:38
std::string text
The text to display.
Definition label.h:41
asw::TextJustify justify
The text justification.
Definition label.h:44
asw::Quad< float > transform
The transform (position and size) of the widget.
Definition widget.h:119
virtual void draw(Context &ctx)
Draw this widget and its children.
Definition widget.cpp:26
Routines for drawing sprites and primitives to the screen.
Label widget for the ASW UI module.
void text(const asw::Font &font, const std::string &text, const asw::Vec2< float > &position, asw::Color color, asw::TextJustify justify=asw::TextJustify::Left)
Draw text.
Definition draw.cpp:151