diff options
| -rw-r--r-- | GUI/GUI/GUI/Config.cpp | 3 | ||||
| -rw-r--r-- | GUI/GUI/GUI/Config.h | 1 | ||||
| -rw-r--r-- | GUI/GUI/GUI/Frame.cpp | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/GUI/GUI/GUI/Config.cpp b/GUI/GUI/GUI/Config.cpp index b73f383..34e7fd5 100644 --- a/GUI/GUI/GUI/Config.cpp +++ b/GUI/GUI/GUI/Config.cpp @@ -94,6 +94,7 @@ AppConfig::AppConfig(wxTextCtrl* out) fx_path(),
params_path(),
menu_path(),
+ unity_generated_dir("TaSTT_Generated"),
clear_osc(true),
whisper_model("ggml-medium.bin"),
@@ -148,6 +149,7 @@ bool AppConfig::Serialize(const std::filesystem::path& path) { cm.Set("fx_path", fx_path);
cm.Set("params_path", params_path);
cm.Set("menu_path", menu_path);
+ cm.Set("unity_generated_dir", unity_generated_dir);
cm.Set("clear_osc", clear_osc);
cm.Set("whisper_model", whisper_model);
@@ -215,6 +217,7 @@ bool AppConfig::Deserialize(const std::filesystem::path& path) { cm.Get("fx_path", c.fx_path);
cm.Get("params_path", c.params_path);
cm.Get("menu_path", c.menu_path);
+ cm.Get("unity_generated_dir", c.unity_generated_dir);
cm.Get("clear_osc", c.clear_osc);
cm.Get("whisper_model", c.whisper_model);
diff --git a/GUI/GUI/GUI/Config.h b/GUI/GUI/GUI/Config.h index 213ce57..bcf4267 100644 --- a/GUI/GUI/GUI/Config.h +++ b/GUI/GUI/GUI/Config.h @@ -82,6 +82,7 @@ public: std::string fx_path;
std::string params_path;
std::string menu_path;
+ std::string unity_generated_dir;
bool clear_osc;
// WhisperCPP-specific settings.
diff --git a/GUI/GUI/GUI/Frame.cpp b/GUI/GUI/GUI/Frame.cpp index 9f8823b..d269728 100644 --- a/GUI/GUI/GUI/Frame.cpp +++ b/GUI/GUI/GUI/Frame.cpp @@ -1040,7 +1040,7 @@ Frame::Frame() unity_config_panel_pairs,
ID_UNITY_ANIMATOR_GENERATED_DIR,
wxEmptyString, wxDefaultPosition, wxDefaultSize,
- wxTE_READONLY);
+ /*style=*/0);
unity_animator_generated_dir->AppendText("TaSTT_Generated");
unity_animator_generated_dir->SetToolTip(
"TaSTT will create a bunch of files "
@@ -1489,6 +1489,10 @@ void Frame::ApplyConfigToInputFields() auto* unity_menu_path = static_cast<wxFilePickerCtrl*>(FindWindowById(ID_UNITY_MENU_FILE_PICKER));
unity_menu_path->SetPath(app_c_->menu_path);
+ auto* unity_generated_dir = static_cast<wxTextCtrl*>(FindWindowById(ID_UNITY_ANIMATOR_GENERATED_DIR));
+ unity_generated_dir->Clear();
+ unity_generated_dir->AppendText(app_c_->unity_generated_dir);
+
auto* unity_chars_per_sync = static_cast<wxChoice*>(FindWindowById(ID_UNITY_CHARS_PER_SYNC));
unity_chars_per_sync->SetSelection(chars_idx);
@@ -1749,6 +1753,7 @@ void Frame::OnGenerateFX(wxCommandEvent& event) app_c_->fx_path = unity_animator_path.string();
app_c_->params_path = unity_parameters_path.string();
app_c_->menu_path = unity_menu_path.string();
+ app_c_->unity_generated_dir = unity_animator_generated_dir;
app_c_->bytes_per_char = bytes_per_char;
app_c_->chars_per_sync = chars_per_sync;
app_c_->rows = rows;
|
