summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-12 13:44:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-12 13:44:52 +0300
commit08d6f25d10f4bd939cbce15ee5b62979e0f6fdc5 (patch)
treeca07306c917b852f18f2d459d6d3e12cee7deb6d
parent91160e197b1a1f85f21cfad874e80fa286d9294f (diff)
downloadmanaplus-08d6f25d10f4bd939cbce15ee5b62979e0f6fdc5.tar.gz
manaplus-08d6f25d10f4bd939cbce15ee5b62979e0f6fdc5.tar.bz2
manaplus-08d6f25d10f4bd939cbce15ee5b62979e0f6fdc5.tar.xz
manaplus-08d6f25d10f4bd939cbce15ee5b62979e0f6fdc5.zip
Remove "use" popup menu handler.
-rw-r--r--src/gui/popups/popupmenu.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 9162a1573..59ed14cba 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -981,27 +981,7 @@ void PopupMenu::handleLink(const std::string &link,
if (actorManager)
being = actorManager->findBeing(mBeingId);
- if (link == "use" && mItemId)
- {
- if (mItemId < SPELL_MIN_ID)
- {
- const Inventory *const inv = PlayerInfo::getInventory();
- if (inv)
- {
- const Item *const item = inv->findItem(mItemId, mItemColor);
- PlayerInfo::useEquipItem(item, true);
- }
- }
- else if (mItemId < SKILL_MIN_ID && spellManager)
- {
- spellManager->useItem(mItemId);
- }
- else if (skillDialog)
- {
- skillDialog->useItem(mItemId);
- }
- }
- else if (link == "chat")
+ if (link == "chat")
{
if (chatWindow)
{
@@ -2050,7 +2030,7 @@ void PopupMenu::showItemPopup(const int x, const int y, const int itemId,
{
// TRANSLATORS: popup menu item
// TRANSLATORS: use item
- mBrowserBox->addRow("use", _("Use"));
+ mBrowserBox->addRow("/use 'ITEMID'", _("Use"));
}
addProtection();
mBrowserBox->addRow("##3---");
@@ -2839,12 +2819,12 @@ void PopupMenu::addUseDrop(const Item *const item, const bool isProtected)
if (str.empty())
{
// TRANSLATORS: popup menu item
- mBrowserBox->addRow("use", _("Use"));
+ mBrowserBox->addRow("/use 'ITEMID'", _("Use"));
}
else
{
// TRANSLATORS: popup menu item
- mBrowserBox->addRow("use", str.c_str());
+ mBrowserBox->addRow("/use 'ITEMID'", str.c_str());
}
if (!isProtected)