27 return { 130, 130, 130, alpha };
42 Toggle(
const i32 x,
const i32 y,
const std::string &content,
const u64 toggle_key,
const Color clr);
70 void SetFont(
const std::string &font_name);
82 inline void SetKey(
const u64 toggle_key) {
83 this->key = toggle_key;
90 void OnRender(render::Renderer::Ref &drawer,
const i32 x,
const i32 y)
override;
91 void OnInput(
const u64 keys_down,
const u64 keys_up,
const u64 keys_held,
const TouchPoint touch_pos)
override;
Definition: elm_Element.hpp:37
Definition: elm_Toggle.hpp:19
Toggle(const i32 x, const i32 y, const std::string &content, const u64 toggle_key, const Color clr)
void SetFont(const std::string &font_name)
void SetX(const i32 x)
Definition: elm_Toggle.hpp:50
u64 GetKey()
Definition: elm_Toggle.hpp:78
static constexpr u32 ContentHorizontalMargin
Definition: elm_Toggle.hpp:21
std::string GetContent()
Definition: elm_Toggle.hpp:65
bool IsChecked()
Definition: elm_Toggle.hpp:86
void OnRender(render::Renderer::Ref &drawer, const i32 x, const i32 y) override
void SetKey(const u64 toggle_key)
Definition: elm_Toggle.hpp:82
i32 GetY() override
Definition: elm_Toggle.hpp:54
void OnInput(const u64 keys_down, const u64 keys_up, const u64 keys_held, const TouchPoint touch_pos) override
static constexpr u8 ToggleAlphaIncrement
Definition: elm_Toggle.hpp:24
void SetColor(const Color clr)
void SetContent(const std::string &content)
static constexpr Color MakeBackgroundColor(const u8 alpha)
Definition: elm_Toggle.hpp:26
i32 GetX() override
Definition: elm_Toggle.hpp:46
static constexpr u32 ContentVerticalMargin
Definition: elm_Toggle.hpp:22
Color GetColor()
Definition: elm_Toggle.hpp:72
void SetY(const i32 y)
Definition: elm_Toggle.hpp:58
SDL_Texture * Texture
Definition: sdl2_Types.hpp:11
Definition: elm_Button.hpp:18
s32 i32
Definition: pu_Include.hpp:28
#define PU_SMART_CTOR(type)
Definition: pu_Include.hpp:19
Definition: ui_Types.hpp:44
Definition: ui_Types.hpp:62