summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-28 19:54:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-28 19:54:36 +0300
commit34a04d798ed0b4f4b652082da994c8648e4517e6 (patch)
treeb7d98ca0f2b9e187c7eeec92ab60b7f5f25dface /src/gui/windows
parent887a4d50d0c966af5f19e5ed2fe8b5556a6f818d (diff)
downloadplus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.gz
plus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.bz2
plus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.xz
plus-34a04d798ed0b4f4b652082da994c8648e4517e6.zip
Add support for images in npc skined menu.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/npcdialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 53f64f41c..f375e9509 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -43,6 +43,7 @@
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
#include "gui/widgets/createwidget.h"
+#include "gui/widgets/icon.h"
#include "gui/widgets/inttextfield.h"
#include "gui/widgets/itemcontainer.h"
#include "gui/widgets/itemlinkhandler.h"
@@ -1166,6 +1167,18 @@ void NpcDialog::createSkinControls()
}
mHideText = dialog->hideText;
+ FOR_EACH (std::vector<NpcImageInfo*>::const_iterator, it, dialog->images)
+ {
+ const NpcImageInfo *const info = *it;
+ Image *const image = Theme::getImageFromTheme(info->name);
+ if (image)
+ {
+ Icon *const icon = new Icon(this, image, AutoRelease_true);
+ icon->setPosition(info->x, info->y);
+ mSkinContainer->add(icon);
+ }
+ }
+
FOR_EACH (std::vector<NpcButtonInfo*>::const_iterator, it, dialog->buttons)
{
const NpcButtonInfo *const info = *it;