aboutsummaryrefslogtreecommitdiff
path: root/include/gui
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/ScrollablePage.hpp9
-rw-r--r--include/gui/SettingsPage.hpp4
2 files changed, 11 insertions, 2 deletions
diff --git a/include/gui/ScrollablePage.hpp b/include/gui/ScrollablePage.hpp
index 5a31b92..ade7c67 100644
--- a/include/gui/ScrollablePage.hpp
+++ b/include/gui/ScrollablePage.hpp
@@ -4,6 +4,8 @@
#include "../SafeVector.hpp"
#include <memory>
+#include <mglpp/system/FloatRect.hpp>
+
namespace gsr {
class ScrollablePage : public Widget {
public:
@@ -15,15 +17,22 @@ namespace gsr {
void draw(mgl::Window &window, mgl::vec2f offset) override;
mgl::vec2f get_size() override;
+ mgl::vec2f get_inner_size() override;
void set_size(mgl::vec2f size);
void add_widget(std::unique_ptr<Widget> widget);
void reset_scroll();
private:
+ float get_scrollbar_width() const;
+ private:
mgl::vec2f size;
SafeVector<std::unique_ptr<Widget>> widgets;
int scroll_target_y = 0;
double scroll_y = 0.0;
+ mgl::FloatRect scrollbar_rect;
+ bool moving_scrollbar_with_cursor = false;
+ mgl::vec2f scrollbar_move_cursor_start_pos;
+ double scrollbar_move_cursor_scroll_y_start = 0.0;
};
} \ No newline at end of file
diff --git a/include/gui/SettingsPage.hpp b/include/gui/SettingsPage.hpp
index b22506e..a9d79bc 100644
--- a/include/gui/SettingsPage.hpp
+++ b/include/gui/SettingsPage.hpp
@@ -57,7 +57,6 @@ namespace gsr {
std::unique_ptr<List> create_video_codec(const GsrInfo &gsr_info);
std::unique_ptr<ComboBox> create_audio_codec_box();
std::unique_ptr<List> create_audio_codec();
- std::unique_ptr<List> create_codec_section(const GsrInfo &gsr_info);
std::unique_ptr<Entry> create_framerate_entry();
std::unique_ptr<List> create_framerate();
std::unique_ptr<ComboBox> create_framerate_mode_box();
@@ -101,7 +100,8 @@ namespace gsr {
List *area_size_list_ptr = nullptr;
List *restore_portal_session_list_ptr = nullptr;
List *color_range_list_ptr = nullptr;
- List *codec_list_ptr = nullptr;
+ Widget *video_codec_ptr = nullptr;
+ Widget *audio_codec_ptr = nullptr;
List *framerate_mode_list_ptr = nullptr;
ComboBox *record_area_box_ptr = nullptr;
Entry *area_width_entry_ptr = nullptr;