aboutsummaryrefslogtreecommitdiff
path: root/aoscene.cpp
diff options
context:
space:
mode:
authorOmniTroid <davidskoland@gmail.com>2017-07-08 18:41:36 +0200
committerOmniTroid <davidskoland@gmail.com>2017-07-08 18:41:36 +0200
commiteae7cc791b093fe777115cb15980509bc5df29f4 (patch)
treed0b8e17862f341f875458f344573405f5794562c /aoscene.cpp
parenta327c3a1e7159abec707c4376ff2d08507385087 (diff)
parent4780ea57157e10dfaf90e14ae56c31e3cb390790 (diff)
Merge branch 'master' of https://github.com/Attorney-Online-Engineering-Task-Force/AO2-Client
bruh
Diffstat (limited to 'aoscene.cpp')
-rw-r--r--aoscene.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/aoscene.cpp b/aoscene.cpp
index 2e266109..61cd342d 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));