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.h
Go to the documentation of this file.
1
8
9#ifndef ASW_MODULES_UI_LABEL_H
10#define ASW_MODULES_UI_LABEL_H
11
12#include <string>
13
14#include "../types.h"
15#include "context.h"
16#include "widget.h"
17
18namespace asw::ui {
19
22class Label : public Widget {
23public:
27 {
28 focusable = false;
29 }
30
35 void draw(Context& ctx) override;
36
39
41 std::string text;
42
45
48};
49
50} // namespace asw::ui
51
52#endif // ASW_MODULES_UI_LABEL_H
Shared state for the UI system.
Definition context.h:75
A text display widget.
Definition label.h:22
asw::Color color
The text color.
Definition label.h:47
asw::Font font
The font to use for rendering.
Definition label.h:38
std::string text
The text to display.
Definition label.h:41
Label()
Default constructor.
Definition label.h:26
asw::TextJustify justify
The text justification.
Definition label.h:44
Base class for all UI widgets.
Definition widget.h:28
bool focusable
Whether the widget can receive focus.
Definition widget.h:66
UI context and focus management for the ASW UI module.
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
Definition types.h:41
TextJustify
Text justification options for text rendering.
Definition types.h:31
RGBA color struct with 8-bit channels.
Definition color.h:11
Types used throughout the ASW library.
Base widget class for the ASW UI module.