From 147892bae917ea1f99fba312db87a31140b3ba37 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 14 Jan 2021 01:34:20 +0300 Subject: Overhaul sound lists to introduce aliases, rethink editing behavior (#389) * Resolve https://github.com/AttorneyOnline/AO2-Client/issues/275 by adding a "Nothing" option to play no SFX even when playing a preanimation that behaves similar to the Default option * Overhaul sound list: * Allow aliases. .ini file syntax is "filename = alias". * Do not allow editing the .ini files from the client anymore. * The sound list dropdown is still editable, but all it does is play your custom sfx without adding it to any files. * Overhaul get_char_sfx * Fix aliases not working properly with a rather tricky solution * save character soundlist in base and drop the character_ from the filename Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> --- include/courtroom.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/courtroom.h') diff --git a/include/courtroom.h b/include/courtroom.h index 92b5a03c..d7bd6966 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -503,6 +503,12 @@ private: // List of all currently available pos QStringList pos_dropdown_list; + // Current list file sorted line by line + QStringList sound_list; + + // Current SFX the user put in for the sfx dropdown list + QString custom_sfx = ""; + // is the message we're about to send supposed to present evidence? bool is_presenting_evidence = false; @@ -804,6 +810,7 @@ private slots: void on_iniswap_remove_clicked(); void on_sfx_dropdown_changed(int p_index); + void on_sfx_dropdown_custom(QString p_sfx); void set_sfx_dropdown(); void on_sfx_context_menu_requested(const QPoint &pos); void on_sfx_edit_requested(); -- cgit