Mask stream keys, add button to unmask it

This commit is contained in:
dec05eba
2025-08-07 02:00:35 +02:00
parent 67a8040e57
commit f1ee19d014
11 changed files with 141 additions and 62 deletions

View File

@@ -41,6 +41,9 @@ namespace gsr {
EntryValidateHandlerResult set_text(const std::string &str);
std::string get_text() const;
void set_masked(bool masked);
bool is_masked() const;
// Return false to specify that the string should not be accepted. This reverts the string back to its previous value.
// The input can be changed by changing the input parameter and returning true.
EntryValidateHandler validate_handler;
@@ -62,11 +65,13 @@ namespace gsr {
mgl::Rectangle background;
mgl::Text32 text;
mgl::Text32 masked_text;
float max_width;
bool selected = false;
bool selecting_text = false;
bool selecting_with_keyboard = false;
bool show_selection = false;
bool masked = false;
Caret caret;
Caret selection_start_caret;
float text_overflow = 0.0f;

View File

@@ -118,9 +118,11 @@ namespace gsr {
std::unique_ptr<ComboBox> create_streaming_service_box();
std::unique_ptr<List> create_streaming_service_section();
std::unique_ptr<List> create_stream_key_section();
std::unique_ptr<List> create_stream_custom_url();
std::unique_ptr<List> create_stream_custom_key();
std::unique_ptr<List> create_stream_custom_section();
std::unique_ptr<ComboBox> create_stream_container_box();
std::unique_ptr<List> create_stream_container_section();
std::unique_ptr<List> create_stream_container();
void add_stream_widgets();
void load_audio_tracks(const RecordOptions &record_options);
@@ -173,8 +175,7 @@ namespace gsr {
ComboBox *container_box_ptr = nullptr;
ComboBox *streaming_service_box_ptr = nullptr;
List *stream_key_list_ptr = nullptr;
List *stream_url_list_ptr = nullptr;
List *container_list_ptr = nullptr;
List *custom_stream_list_ptr = nullptr;
CheckBox *save_replay_in_game_folder_ptr = nullptr;
CheckBox *restart_replay_on_save = nullptr;
Label *estimated_file_size_ptr = nullptr;

View File

@@ -45,6 +45,8 @@ namespace gsr {
void set_visible(bool visible);
Widget* get_parent_widget();
void *userdata = nullptr;
protected:
void set_widget_as_selected_in_parent();