summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-08 23:37:30 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-08 23:37:30 +0200
commit958b06cd741311d42c03c6b91c64ea01c713f516 (patch)
treeb309d316087f85cdf57d266bf678f9923007899b /src/gui
parentee1a1c0e14058fb1a31904a6e2cf0c0ce90bc26b (diff)
downloadmanaverse-958b06cd741311d42c03c6b91c64ea01c713f516.tar.gz
manaverse-958b06cd741311d42c03c6b91c64ea01c713f516.tar.bz2
manaverse-958b06cd741311d42c03c6b91c64ea01c713f516.tar.xz
manaverse-958b06cd741311d42c03c6b91c64ea01c713f516.zip
Replace also color constants in pickup messages.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popupmenu.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 799b61374..4c970ed19 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -388,9 +388,14 @@ void PopupMenu::showPopup(int x, int y, FloorItem *floorItem)
mFloorItem = floorItem;
ItemInfo info = floorItem->getInfo();
mBrowserBox->clearRows();
+ std::string name;
// Floor item can be picked up (single option, candidate for removal)
- std::string name = info.getName();
+ if (serverVersion > 0)
+ name = info.getName(floorItem->getColor());
+ else
+ name = info.getName();
+
mBrowserBox->addRow(name);
mBrowserBox->addRow(_("@@pickup|Pick up@@"));
mBrowserBox->addRow(_("@@chat|Add to chat@@"));
@@ -821,9 +826,29 @@ void PopupMenu::handleLink(const std::string &link,
if (chatWindow)
{
if (mItem)
- chatWindow->addItemText(mItem->getInfo().getName());
+ {
+ if (serverVersion > 0)
+ {
+ chatWindow->addItemText(mItem->getInfo().getName(
+ mItem->getColor()));
+ }
+ else
+ {
+ chatWindow->addItemText(mItem->getInfo().getName());
+ }
+ }
else if (mFloorItem)
- chatWindow->addItemText(mFloorItem->getInfo().getName());
+ {
+ if (serverVersion > 0)
+ {
+ chatWindow->addItemText(mFloorItem->getInfo().getName(
+ mFloorItem->getColor()));
+ }
+ else
+ {
+ chatWindow->addItemText(mFloorItem->getInfo().getName());
+ }
+ }
}
}
else if (link == "whisper" && !mNick.empty() && chatWindow)