diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-06 08:22:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-06 08:22:42 +0200 |
commit | 520c61ec64c001d2c9c9d953051aa58715831731 (patch) | |
tree | 2c0e10995d1a85374f628e78a53321f727013bf3 /src/main.cpp | |
parent | 9b6033e2b97f6f572cb69a393d4d1d1ea41b5d72 (diff) |
Add checkbox, scale more sizes by window scale
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4ec211b..939866a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,6 +4,7 @@ #include "../include/gui/DropdownButton.hpp" #include "../include/gui/Button.hpp" #include "../include/gui/Entry.hpp" +#include "../include/gui/CheckBox.hpp" #include "../include/gui/ComboBox.hpp" #include "../include/gui/Label.hpp" #include "../include/gui/List.hpp" @@ -208,6 +209,7 @@ static const mgl_monitor* find_monitor_by_cursor_position(mgl::Window &window) { static void add_widgets_to_settings_page(mgl::vec2i window_size, mgl::vec2f settings_page_position, mgl::vec2f settings_page_size, gsr::Page *settings_page, gsr::Page *settings_content_page, const gsr::GsrInfo &gsr_info, const std::vector<gsr::AudioDevice> &audio_devices, std::function<void()> settings_back_button_callback) { auto back_button = std::make_unique<gsr::Button>(&gsr::get_theme().title_font, "Back", mgl::vec2f(window_size.x / 10, window_size.y / 15), gsr::get_theme().scrollable_page_bg_color); back_button->set_position(settings_page_position + mgl::vec2f(settings_page_size.x + window_size.x / 50, 0.0f).floor()); + back_button->set_border_scale(0.003f); back_button->on_click = settings_back_button_callback; settings_page->add_widget(std::move(back_button)); @@ -386,6 +388,11 @@ static void add_widgets_to_settings_page(mgl::vec2i window_size, mgl::vec2f sett file_list->add_widget(std::move(container_list)); } settings_list->add_widget(std::move(file_list)); + + settings_list->add_widget(std::make_unique<gsr::CheckBox>(&gsr::get_theme().body_font, "Record cursor")); + settings_list->add_widget(std::make_unique<gsr::CheckBox>(&gsr::get_theme().body_font, "Show recording started notification")); + //settings_list->add_widget(std::make_unique<gsr::CheckBox>(&gsr::get_theme().body_font, "Show recording stopped notification")); + settings_list->add_widget(std::make_unique<gsr::CheckBox>(&gsr::get_theme().body_font, "Show video saved notification")); } settings_content_page->add_widget(std::move(settings_list)); } |