summaryrefslogtreecommitdiff
path: root/src/gui/windows/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-28 18:36:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-28 18:36:52 +0300
commit887a4d50d0c966af5f19e5ed2fe8b5556a6f818d (patch)
tree16ac03d6c9d8182ef39913501985d45bd33e7a5a /src/gui/windows/npcdialog.cpp
parent8cd16a9a9ca605137276379361b0328af736c2cc (diff)
downloadmv-887a4d50d0c966af5f19e5ed2fe8b5556a6f818d.tar.gz
mv-887a4d50d0c966af5f19e5ed2fe8b5556a6f818d.tar.bz2
mv-887a4d50d0c966af5f19e5ed2fe8b5556a6f818d.tar.xz
mv-887a4d50d0c966af5f19e5ed2fe8b5556a6f818d.zip
In npc skinned dialogs add support for hide text part from npc window.
Diffstat (limited to 'src/gui/windows/npcdialog.cpp')
-rw-r--r--src/gui/windows/npcdialog.cpp53
1 files changed, 36 insertions, 17 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index bb6a84eb7..53f64f41c 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -136,7 +136,8 @@ NpcDialog::NpcDialog(const BeingId npcId) :
mCameraX(0),
mCameraY(0),
mShowAvatar(false),
- mLogInteraction(config.getBoolValue("logNpcInGui"))
+ mLogInteraction(config.getBoolValue("logNpcInGui")),
+ mHideText(false)
{
// Basic Window Setup
setWindowName("NpcText");
@@ -828,22 +829,43 @@ void NpcDialog::placeMenuControls()
void NpcDialog::placeSkinControls()
{
createSkinControls();
- if (mShowAvatar)
+ if (mHideText)
{
- place(0, 0, mPlayerBox);
- place(1, 0, mScrollArea, 6, 3);
- place(0, 3, mSkinScrollArea, 7, 3);
- place(1, 6, mButton2, 2);
- place(3, 6, mClearButton, 2);
- place(5, 6, mButton, 2);
+ if (mShowAvatar)
+ {
+ place(0, 0, mPlayerBox);
+ place(1, 0, mSkinScrollArea, 7, 3);
+ place(1, 3, mButton2, 2);
+ place(3, 3, mClearButton, 2);
+ place(5, 3, mButton, 2);
+ }
+ else
+ {
+ place(0, 0, mSkinScrollArea, 6, 3);
+ place(0, 3, mButton2, 2);
+ place(2, 3, mClearButton, 2);
+ place(4, 3, mButton, 2);
+ }
}
else
{
- place(0, 0, mScrollArea, 6, 3);
- place(0, 3, mSkinScrollArea, 6, 3);
- place(0, 6, mButton2, 2);
- place(2, 6, mClearButton, 2);
- place(4, 6, mButton, 2);
+ if (mShowAvatar)
+ {
+ place(0, 0, mPlayerBox);
+ place(1, 0, mScrollArea, 6, 3);
+ place(0, 3, mSkinScrollArea, 7, 3);
+ place(1, 6, mButton2, 2);
+ place(3, 6, mClearButton, 2);
+ place(5, 6, mButton, 2);
+ }
+ else
+ {
+ place(0, 0, mScrollArea, 6, 3);
+ place(0, 3, mSkinScrollArea, 6, 3);
+ place(0, 6, mButton2, 2);
+ place(2, 6, mClearButton, 2);
+ place(4, 6, mButton, 2);
+ }
}
}
@@ -1143,6 +1165,7 @@ void NpcDialog::createSkinControls()
return;
}
+ mHideText = dialog->hideText;
FOR_EACH (std::vector<NpcButtonInfo*>::const_iterator, it, dialog->buttons)
{
const NpcButtonInfo *const info = *it;
@@ -1158,10 +1181,6 @@ void NpcDialog::createSkinControls()
button->loadImageSet(info->image);
}
mSkinContainer->add(button);
- logger->log("test 1");
button->adjustSize();
- logger->log("test 2");
- button->setWidth(20);
- button->setHeight(20);
}
}