diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-08 23:37:30 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-08 23:37:30 +0200 |
commit | 958b06cd741311d42c03c6b91c64ea01c713f516 (patch) | |
tree | b309d316087f85cdf57d266bf678f9923007899b /src/gui/popupmenu.cpp | |
parent | ee1a1c0e14058fb1a31904a6e2cf0c0ce90bc26b (diff) | |
download | manaverse-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/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 31 |
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) |