#pragma once #include "StaticPage.hpp" #include "../GsrInfo.hpp" #include "../Config.hpp" #include namespace gsr { class GsrPage; class PageStack; class ScrollablePage; class Subsection; class RadioButton; class Button; class GlobalSettingsPage : public StaticPage { public: GlobalSettingsPage(const GsrInfo *gsr_info, Config &config, PageStack *page_stack); GlobalSettingsPage(const GlobalSettingsPage&) = delete; GlobalSettingsPage& operator=(const GlobalSettingsPage&) = delete; void load(); void save(); void on_navigate_away_from_page() override; std::function on_startup_changed; std::function on_click_exit_program_button; std::function on_keyboard_hotkey_changed; std::function on_joystick_hotkey_changed; private: std::unique_ptr create_appearance_subsection(ScrollablePage *parent_page); std::unique_ptr create_startup_subsection(ScrollablePage *parent_page); std::unique_ptr create_enable_keyboard_hotkeys_button(); std::unique_ptr create_enable_joystick_hotkeys_button(); std::unique_ptr create_hotkey_subsection(ScrollablePage *parent_page); std::unique_ptr