aboutsummaryrefslogtreecommitdiff
path: root/aocharbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aocharbutton.cpp')
-rw-r--r--aocharbutton.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/aocharbutton.cpp b/aocharbutton.cpp
index 1c0b4f79..79dc4e8a 100644
--- a/aocharbutton.cpp
+++ b/aocharbutton.cpp
@@ -5,17 +5,19 @@
#include <QFile>
-AOCharButton::AOCharButton(QWidget *parent)
+AOCharButton::AOCharButton(QWidget *parent, AOApplication *p_ao_app)
{
m_parent = parent;
+ ao_app = p_ao_app;
+
this->resize(60, 60);
}
void AOCharButton::set_image(QString p_character)
{
- QString image_path = get_character_path(p_character) + "char_icon.png";
- QString legacy_path = get_demothings_path() + p_character.toLower() + "_char_icon.png";
+ QString image_path = ao_app->get_character_path(p_character) + "char_icon.png";
+ QString legacy_path = ao_app->get_demothings_path() + p_character.toLower() + "_char_icon.png";
if (file_exists(image_path))
this->setStyleSheet("border-image:url(\"" + image_path + "\")");