44 this->is_clicked =
false;
46 click_sound = LoadSound(
"resources/sfx/menu_hover.wav");
47 hover_sound = LoadSound(
"resources/sfx/menu_click.wav");
105 this->checked = checked;
113 void Draw()
override;
Definition: ui_elements.hpp:94
void SetChecked(bool value)
Sets the "Checked" status of the boxes.
Definition: ui_elements.cpp:66
void Draw() override
Draws the sprites.
Definition: ui_elements.cpp:56
bool IsChecked()
Checks whether or not any of the checkboxes are checked.
Definition: ui_elements.cpp:61
virtual ~CheckBox()=default
CheckBox(const char *text, Rectangle bounds, float rotation, bool checked=false)
Definition: ui_elements.hpp:102
const char * placeholder_text
Definition: ui_elements.hpp:99
Definition: drawable.hpp:13
Drawable()
Sets the sprites' IDs.
Definition: drawable.cpp:8
Definition: ui_elements.hpp:75
const char * text
Definition: ui_elements.hpp:77
void Draw() override
Draws the sprites.
Definition: ui_elements.cpp:51
Label(const char *text, Rectangle bounds, float rotation)
Definition: ui_elements.hpp:80
Definition: ui_elements.hpp:7
UIElement(Rectangle bounds, float rotation)
Definition: ui_elements.hpp:13
float GetRotation()
Definition: ui_elements.cpp:19
float rotation
Definition: ui_elements.hpp:10
Rectangle bounds
Definition: ui_elements.hpp:9
Vector2 GetPosition()
Definition: ui_elements.cpp:9
void SetPosition(Vector2 position)
Definition: ui_elements.cpp:3
void SetSize(Vector2 size)
Definition: ui_elements.cpp:24
void SetRotation(float rotation)
Definition: ui_elements.cpp:14
Vector2 GetSize()
Definition: ui_elements.cpp:30
virtual ~UIElement()=default