Add option to start replay on fullscreen

This commit is contained in:
dec05eba
2024-11-14 00:25:37 +01:00
parent 4ba1e814b7
commit d2f6b0738b
12 changed files with 218 additions and 41 deletions

View File

@@ -5,11 +5,11 @@
namespace gsr {
class LineSeparator : public Widget {
public:
enum class Type {
enum class Orientation {
HORIZONTAL
};
LineSeparator(Type type, float width);
LineSeparator(Orientation orientation, float width);
LineSeparator(const LineSeparator&) = delete;
LineSeparator& operator=(const LineSeparator&) = delete;
@@ -18,7 +18,7 @@ namespace gsr {
mgl::vec2f get_size() override;
private:
Type type;
Orientation orientation;
float width;
};
}

View File

@@ -9,7 +9,12 @@
namespace gsr {
class RadioButton : public Widget {
public:
RadioButton(mgl::Font *font);
enum class Orientation {
VERTICAL,
HORIZONTAL
};
RadioButton(mgl::Font *font, Orientation orientation);
RadioButton(const RadioButton&) = delete;
RadioButton& operator=(const RadioButton&) = delete;
@@ -32,6 +37,7 @@ namespace gsr {
};
mgl::Font *font;
Orientation orientation;
std::vector<Item> items;
size_t selected_item = 0;
bool dirty = true;

View File

@@ -92,7 +92,7 @@ namespace gsr {
std::unique_ptr<List> create_container_section();
std::unique_ptr<Entry> create_replay_time_entry();
std::unique_ptr<List> create_replay_time();
std::unique_ptr<CheckBox> create_start_replay_on_startup();
std::unique_ptr<RadioButton> create_start_replay_automatically();
std::unique_ptr<CheckBox> create_save_replay_in_game_folder();
std::unique_ptr<Label> create_estimated_file_size();
void update_estimated_file_size();
@@ -165,7 +165,6 @@ namespace gsr {
List *stream_key_list_ptr = nullptr;
List *stream_url_list_ptr = nullptr;
List *container_list_ptr = nullptr;
CheckBox *start_replay_automatically_ptr = nullptr;
CheckBox *save_replay_in_game_folder_ptr = nullptr;
Label *estimated_file_size_ptr = nullptr;
CheckBox *show_replay_started_notification_checkbox_ptr = nullptr;
@@ -181,6 +180,7 @@ namespace gsr {
Entry *youtube_stream_key_entry_ptr = nullptr;
Entry *stream_url_entry_ptr = nullptr;
Entry *replay_time_entry_ptr = nullptr;
RadioButton *turn_on_replay_automatically_mode_ptr = nullptr;
PageStack *page_stack = nullptr;