diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2024-05-30 15:13:35 -0500 |
|---|---|---|
| committer | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2024-05-30 15:13:35 -0500 |
| commit | 37f103e2c27015dc311371d621097f0b3b523b70 (patch) | |
| tree | e5ca674842d02782fd35ab1508cefdd9f424af17 | |
| parent | 83715f4276ee4eb705b77a80e7484d7e7236fffe (diff) | |
restore old bg fallback behavior
| -rw-r--r-- | src/courtroom.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 9c916ea3..f8bececa 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -4527,7 +4527,21 @@ void Courtroom::set_scene(bool show_desk, const QString f_side) QPair<QString, QRect> bg_pair = ao_app->get_pos_path(f_side); QPair<QString, QRect> desk_pair = ao_app->get_pos_path(f_side, true); - ui_vp_background->loadAndPlayAnimation(bg_pair.first); + if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(bg_pair.first)))) + { + ui_vp_background->show(); + ui_vp_background->loadAndPlayAnimation(bg_pair.first); + } + else if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path("wit")))) + { + ui_vp_background->show(); + ui_vp_background->loadAndPlayAnimation(ao_app->get_image_suffix(ao_app->get_background_path("wit"))); + } + else + { + ui_vp_background->hide(); + } + if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(desk_pair.first)))) { ui_vp_desk->loadAndPlayAnimation(desk_pair.first); |
