aboutsummaryrefslogtreecommitdiff
path: root/include/gui/Button.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-06 03:11:43 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-06 03:11:43 +0200
commitb778fd7cc654f28a2bfe0ff74537f120241b289c (patch)
treede1830608492356d818cce314094e2359a3a478a /include/gui/Button.hpp
parentae1897cf2ce6a447b253ffa8489b5c016a23fb41 (diff)
Change fonts, nicer combobox, add/remove audio track button
Diffstat (limited to 'include/gui/Button.hpp')
-rw-r--r--include/gui/Button.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/gui/Button.hpp b/include/gui/Button.hpp
index c9a933b..0a07423 100644
--- a/include/gui/Button.hpp
+++ b/include/gui/Button.hpp
@@ -9,6 +9,8 @@
namespace gsr {
class Button : public Widget {
public:
+ // If width is 0 then the width of the text is used instead (with padding).
+ // If height is 0 then the height of the text is used instead (with padding).
Button(mgl::Font *font, const char *text, mgl::vec2f size, mgl::Color bg_color);
Button(const Button&) = delete;
Button& operator=(const Button&) = delete;
@@ -16,7 +18,7 @@ namespace gsr {
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
void draw(mgl::Window &window, mgl::vec2f offset) override;
- mgl::vec2f get_size() override { return size; }
+ mgl::vec2f get_size() override;
std::function<void()> on_click;
private: