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
panel.h
Go to the documentation of this file.
1
8
9#ifndef ASW_MODULES_UI_PANEL_H
10#define ASW_MODULES_UI_PANEL_H
11
12#include "../types.h"
13#include "context.h"
14#include "widget.h"
15
16namespace asw::ui {
17
20class Panel : public Widget {
21public:
25 {
26 focusable = false;
27 }
28
30 asw::Color bg { 0, 0, 0, 0 };
31
34
39 void draw(Context& ctx) override;
40};
41
42} // namespace asw::ui
43
44#endif // ASW_MODULES_UI_PANEL_H
Shared state for the UI system.
Definition context.h:75
A container widget with a background color or image.
Definition panel.h:20
void draw(Context &ctx) override
Draw the panel and its children.
Definition panel.cpp:5
asw::Color bg
The background color.
Definition panel.h:30
Panel()
Default constructor.
Definition panel.h:24
asw::Texture bg_image
The background image texture.
Definition panel.h:33
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< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Definition types.h:38
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.