aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
authorin1tiate <32779090+in1tiate@users.noreply.github.com>2024-05-30 15:13:35 -0500
committerin1tiate <32779090+in1tiate@users.noreply.github.com>2024-05-30 15:13:35 -0500
commit37f103e2c27015dc311371d621097f0b3b523b70 (patch)
treee5ca674842d02782fd35ab1508cefdd9f424af17 /src/courtroom.cpp
parent83715f4276ee4eb705b77a80e7484d7e7236fffe (diff)
restore old bg fallback behavior
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp16
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);