23#include "../ktech.hpp"
44 const std::vector<std::string>& text,
47 :
Widget(
engine, ui, position), m_foregroundRGBA(foreground), m_backgroundRGBA(background)
58 void SetText(
const std::vector<std::string>& text)
62 .Transform([](
KTech::CellA& cell){
if (cell.
c ==
' ') cell.
c =
'\0'; })
63 .Transform([&](
KTech::CellA& cell){ cell.
b = m_backgroundRGBA; });
75 enum TextureIndex :
size_t
Widget that displays framed text.
Definition aboutbox.hpp:29
AboutBox(KTech::Engine &engine, KTech::ID< KTech::UI > ui, KTech::Point position, const std::vector< std::string > &text, KTech::RGBA foreground=KTech::RGBAColors::black, KTech::RGBA background=KTech::RGBAColors::gray)
Construct an AboutBox.
Definition aboutbox.hpp:41
void SetText(const std::vector< std::string > &text)
Change the displayed text.
Definition aboutbox.hpp:58
Complete engine containing all engine components.
Definition engine.hpp:41
Like Cell, but with RGBA foreground and background colors, instead of RGB.
Definition cella.hpp:32
RGBA b
Background color.
Definition cella.hpp:34
char c
ASCII character.
Definition cella.hpp:35
Serializable world structure identifier.
Definition id.hpp:38
2D vector, mostly used to store positions and directions.
Definition point.hpp:30
Like RGB, but also has an alpha channel representing transparency.
Definition rgba.hpp:30
Unsigned 2D vector, mostly used to store sizes and 2D indexes.
Definition upoint.hpp:29