From a3e479d5b289166ff651fac4ff046656cf78cda0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 7 Aug 2024 00:21:32 +0200 Subject: Add radio button with simple/advanced view, add widget visibility --- include/gui/ScrollablePage.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/gui/ScrollablePage.hpp') diff --git a/include/gui/ScrollablePage.hpp b/include/gui/ScrollablePage.hpp index 2ad3c92..9d4623b 100644 --- a/include/gui/ScrollablePage.hpp +++ b/include/gui/ScrollablePage.hpp @@ -12,10 +12,16 @@ 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; + + void set_margins(float top, float bottom, float left, float right); private: - float get_border_size(mgl::Window &window) const; + float get_border_size() const; private: mgl::vec2f size; + float margin_top_scale = 0.0f; + float margin_bottom_scale = 0.0f; + float margin_left_scale = 0.0f; + float margin_right_scale = 0.0f; }; } \ No newline at end of file -- cgit v1.2.3