aboutsummaryrefslogtreecommitdiff
path: root/include/gui/GsrPage.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-24 14:08:25 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-24 14:08:25 +0200
commitb8e6949dfb8a88c832e82f8b7e853fe0ed462da0 (patch)
tree596f3f33b44aee1feb4d28477f4270ad826434b2 /include/gui/GsrPage.hpp
parent54c60d9a18d103011a12939c5029dd35a8e9e200 (diff)
Remove scrollable page from gsr page, fix crash when navigating back
Diffstat (limited to 'include/gui/GsrPage.hpp')
-rw-r--r--include/gui/GsrPage.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/gui/GsrPage.hpp b/include/gui/GsrPage.hpp
index 9f38382..916055a 100644
--- a/include/gui/GsrPage.hpp
+++ b/include/gui/GsrPage.hpp
@@ -1,7 +1,6 @@
#pragma once
#include "Page.hpp"
-#include "ScrollablePage.hpp"
#include "Button.hpp"
#include <mglpp/graphics/Text.hpp>
@@ -19,20 +18,21 @@ namespace gsr {
mgl::vec2f get_size() override;
mgl::vec2f get_inner_size() override;
- void add_widget(std::unique_ptr<Widget> widget) override;
-
void set_margins(float top, float bottom, float left, float right);
void set_on_back_button_click(std::function<void()> on_click_handler);
private:
void draw_page_label(mgl::Window &window, mgl::vec2f body_pos);
+ void draw_children(mgl::Window &window, mgl::vec2f position);
+
float get_border_size() const;
float get_horizontal_spacing() const;
+ mgl::vec2f get_content_position();
+ mgl::vec2f get_content_position_with_margin();
private:
float margin_top_scale = 0.0f;
float margin_bottom_scale = 0.0f;
float margin_left_scale = 0.0f;
float margin_right_scale = 0.0f;
- ScrollablePage scrollable_body;
Button back_button;
mgl::Text label_text;
};