From b8e6949dfb8a88c832e82f8b7e853fe0ed462da0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 24 Aug 2024 14:08:25 +0200 Subject: Remove scrollable page from gsr page, fix crash when navigating back --- include/gui/FileChooser.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/gui/FileChooser.hpp') diff --git a/include/gui/FileChooser.hpp b/include/gui/FileChooser.hpp index b8ea23e..309ff56 100644 --- a/include/gui/FileChooser.hpp +++ b/include/gui/FileChooser.hpp @@ -13,7 +13,7 @@ namespace gsr { class FileChooser : public Widget { public: - FileChooser(const char *start_directory, mgl::vec2f content_size); + FileChooser(const char *start_directory, mgl::vec2f size); FileChooser(const FileChooser&) = delete; FileChooser& operator=(const FileChooser&) = delete; @@ -24,11 +24,16 @@ namespace gsr { void set_current_directory(const char *directory); private: - mgl::vec2f content_size; + struct Folder { + mgl::Text text; + time_t last_modified_seconds = 0; + }; + + mgl::vec2f size; mgl::Text current_directory_text; int mouse_over_item = -1; int selected_item = -1; - std::vector folders; + std::vector folders; mgl::Clock double_click_timer; int times_clicked_within_timer = 0; }; -- cgit v1.2.3