diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-10-31 18:26:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-31 18:26:10 -0500 |
| commit | e0e28983933def4b88ab8045d4352ba8f28200bd (patch) | |
| tree | b7062b15fb6f9c2a97ce7466f5d70e0046a9f60d /src | |
| parent | 30be47ebfc6260fd1d9297a6b10f467b5b34a4e1 (diff) | |
| parent | 5fc87a93d2c265c4d7edce4163cb3009ca73c8ef (diff) | |
Merge pull request #319 from AttorneyOnline/in1tiate/music-missingno
Indicate when a song was not found to reduce confusion
Diffstat (limited to 'src')
| -rw-r--r-- | src/courtroom.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index e8d32623..521e429f 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1533,9 +1533,8 @@ void Courtroom::on_chat_return_pressed() return; ui_ic_chat_message->blockSignals(true); - QTimer::singleShot(600, this, [=] { - ui_ic_chat_message->blockSignals(false); - }); + QTimer::singleShot(600, this, + [=] { ui_ic_chat_message->blockSignals(false); }); // MS# // deskmod# // pre-emote# @@ -3159,8 +3158,12 @@ void Courtroom::handle_song(QStringList *p_contents) } music_player->play(f_song, channel, looping, effect_flags); - if (channel == 0) - ui_music_name->setText(f_song_clear); + if (channel == 0) { + if (file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song)))) + ui_music_name->setText(f_song_clear); + else + ui_music_name->setText(tr("[MISSING] %1").arg(f_song_clear)); + } } else { QString str_char = char_list.at(n_char).name; @@ -3191,8 +3194,12 @@ void Courtroom::handle_song(QStringList *p_contents) append_ic_text(f_song_clear, str_show, tr("has played a song")); music_player->play(f_song, channel, looping, effect_flags); - if (channel == 0) - ui_music_name->setText(f_song_clear); + if (channel == 0) { + if (file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song)))) + ui_music_name->setText(f_song_clear); + else + ui_music_name->setText(tr("[MISSING] %1").arg(f_song_clear)); + } } } } |
