diff --git a/aoscene.cpp b/aoscene.cpp index 2e26610..61cd342 100644 --- a/aoscene.cpp +++ b/aoscene.cpp @@ -14,16 +14,20 @@ AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent) void AOScene::set_image(QString p_image) { - QString background_path = ao_app->get_background_path() + p_image; + QString background_path = ao_app->get_background_path() + p_image + ".png"; + QString animated_background_path = ao_app->get_background_path() + p_image + ".gif"; QString default_path = ao_app->get_default_background_path() + p_image; QPixmap background(background_path); + QPixmap animated_background(animated_background_path); QPixmap default_bg(default_path); int w = this->width(); int h = this->height(); - if (file_exists(background_path)) + if (file_exists(animated_background_path)) + this->setPixmap(animated_background.scaled(w, h)); + else if (file_exists(background_path)) this->setPixmap(background.scaled(w, h)); else this->setPixmap(default_bg.scaled(w, h)); diff --git a/courtroom.cpp b/courtroom.cpp index 244a9c0..38da068 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -1348,48 +1348,48 @@ void Courtroom::set_scene() show_testimony(); //witness is default if pos is invalid - QString f_background = "witnessempty.png"; - QString f_desk_image = "stand.png"; + QString f_background = "witnessempty"; + QString f_desk_image = "stand"; QString f_desk_mod = m_chatmessage[DESK_MOD]; QString f_side = m_chatmessage[SIDE]; if (f_side == "def") { - f_background = "defenseempty.png"; + f_background = "defenseempty"; if (is_ao2_bg) - f_desk_image = "defensedesk.png"; + f_desk_image = "defensedesk"; else - f_desk_image = "bancodefensa.png"; + f_desk_image = "bancodefensa"; } else if (f_side == "pro") { - f_background = "prosecutorempty.png"; + f_background = "prosecutorempty"; if (is_ao2_bg) - f_desk_image = "prosecutiondesk.png"; + f_desk_image = "prosecutiondesk"; else - f_desk_image = "bancoacusacion.png"; + f_desk_image = "bancoacusacion"; } else if (f_side == "jud") { - f_background = "judgestand.png"; - f_desk_image = "judgedesk.png"; + f_background = "judgestand"; + f_desk_image = "judgedesk"; } else if (f_side == "hld") { - f_background = "helperstand.png"; - f_desk_image = "helperdesk.png"; + f_background = "helperstand"; + f_desk_image = "helperdesk"; } else if (f_side == "hlp") { - f_background = "prohelperstand.png"; - f_desk_image = "prohelperdesk.png"; + f_background = "prohelperstand"; + f_desk_image = "prohelperdesk"; } else { if (is_ao2_bg) - f_desk_image = "stand.png"; + f_desk_image = "stand"; else - f_desk_image = "estrado.png"; + f_desk_image = "estrado"; } ui_vp_background->set_image(f_background);