summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-28 21:02:57 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-28 22:52:27 +0300
commited17aa400a745a81940020e024a3944671a47281 (patch)
treeeac1fe8c0a1e4f1cac2fce2614c002dd449141dd /src/gui
parent519c7cfaccac61beaa84751b7dfeed1c50600bed (diff)
downloadManaVerse-ed17aa400a745a81940020e024a3944671a47281.tar.gz
ManaVerse-ed17aa400a745a81940020e024a3944671a47281.tar.bz2
ManaVerse-ed17aa400a745a81940020e024a3944671a47281.tar.xz
ManaVerse-ed17aa400a745a81940020e024a3944671a47281.zip
Add text object to skined npc menus.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/npcdialog.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 9d96336b1..f5639acd8 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -1173,7 +1173,31 @@ void NpcDialog::createSkinControls()
mSkinContainer->add(icon);
}
}
-
+ FOR_EACH (std::vector<NpcTextInfo*>::const_iterator, it, dialog->texts)
+ {
+ const NpcTextInfo *const info = *it;
+ BrowserBox *box = new BrowserBox(this,
+ BrowserBox::AUTO_WRAP,
+ true,
+ "browserbox.xml");
+ box->setOpaque(false);
+ box->setMaxRow(config.getIntValue("ChatLogLength"));
+ box->setLinkHandler(mItemLinkHandler);
+ box->setProcessVars(true);
+ box->setFont(gui->getNpcFont());
+ box->setEnableKeys(true);
+ box->setEnableTabs(true);
+ box->setPosition(info->x, info->y);
+ mSkinContainer->add(box);
+ box->setWidth(info->width);
+ box->setHeight(info->height);
+ StringVect parts;
+ splitToStringVector(parts, info->text, '\n');
+ FOR_EACH (StringVectCIter, it2, parts)
+ {
+ box->addRow(*it2);
+ }
+ }
FOR_EACH (std::vector<NpcButtonInfo*>::const_iterator, it, dialog->buttons)
{
const NpcButtonInfo *const info = *it;