23#include "../ktech.hpp"
47 :
Widget(
engine, ui, position), m_unselectedRGBA(unselected), m_selectedRGBA(selected)
73 enum TextureIndex :
size_t
88 void OnSelect()
override
93 void OnDeselect()
override
102 texture.Transform([&](
KTech::CellA& cell){ cell.
f = m_selectedRGBA; });
106 void RenderUnselected()
110 texture.Transform([&](
KTech::CellA& cell){ cell.
f = m_unselectedRGBA; });
Widget that looks like a frame.
Definition frame.hpp:29
Frame(KTech::Engine &engine, KTech::ID< KTech::UI > ui, KTech::Point position, KTech::UPoint size, KTech::RGBA unselected=KTech::RGBAColors::gray, KTech::RGBA selected=KTech::RGBAColors::white)
Construct a Frame.
Definition frame.hpp:41
void SetSize(KTech::UPoint size)
Resize the frame.
Definition frame.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 f
Foreground (character) color.
Definition cella.hpp:33
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
A CellA-based sprite.
Definition texture.hpp:48
Unsigned 2D vector, mostly used to store sizes and 2D indexes.
Definition upoint.hpp:29
uint32_t y
Y axis.
Definition upoint.hpp:31
uint32_t x
X axis.
Definition upoint.hpp:30