aboutsummaryrefslogtreecommitdiff
path: root/aoscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aoscene.cpp')
-rw-r--r--aoscene.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/aoscene.cpp b/aoscene.cpp
new file mode 100644
index 00000000..d910a3ec
--- /dev/null
+++ b/aoscene.cpp
@@ -0,0 +1,21 @@
+#include "aoscene.h"
+
+#include "courtroom.h"
+
+#include "file_functions.h"
+
+AOScene::AOScene(Courtroom *parent) : QLabel(parent)
+{
+ m_courtroom = parent;
+}
+
+void AOScene::set_image(QString p_image)
+{
+ QString background_path = m_courtroom->get_background_path() + p_image;
+ QString default_path = m_courtroom->get_default_background_path() + p_image;
+
+ if (file_exists(background_path))
+ this->setPixmap(background_path);
+ else
+ this->setPixmap(default_path);
+}