diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-28 19:54:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-28 19:54:36 +0300 |
commit | 34a04d798ed0b4f4b652082da994c8648e4517e6 (patch) | |
tree | b7d98ca0f2b9e187c7eeec92ab60b7f5f25dface /src/gui/windows/npcdialog.cpp | |
parent | 887a4d50d0c966af5f19e5ed2fe8b5556a6f818d (diff) | |
download | manaplus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.gz manaplus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.bz2 manaplus-34a04d798ed0b4f4b652082da994c8648e4517e6.tar.xz manaplus-34a04d798ed0b4f4b652082da994c8648e4517e6.zip |
Add support for images in npc skined menu.
Diffstat (limited to 'src/gui/windows/npcdialog.cpp')
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 13 |
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; |