diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
commit | 6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d (patch) | |
tree | 4e6e178095ac8cf89dc0dba4f532913891305436 /src/gui/popupmenu.cpp | |
parent | ee8f131b49bb9b1d66cac3840b3c566eb49bcf3f (diff) | |
download | mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.gz mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.bz2 mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.xz mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.zip |
Merged testing branch into master.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 41ecafc9..7a702cc2 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -271,10 +271,10 @@ void PopupMenu::handleLink(const std::string &link) { } - else if (link == "use") + else if (link == "activate") { assert(mItem); - if (mItem->isEquipment()) + if (mItem->isEquippable()) { if (mItem->isEquipped()) mItem->doEvent("doUnequip"); @@ -282,9 +282,10 @@ void PopupMenu::handleLink(const std::string &link) mItem->doEvent("doEquip"); } else + { mItem->doEvent("doUse"); + } } - else if (link == "chat") { if (mItem) @@ -360,15 +361,15 @@ void PopupMenu::showPopup(Window *parent, int x, int y, Item *item, if (isInventory) { - if (item->isEquipment()) + if (item->getInfo().getEquippable()) { if (item->isEquipped()) - mBrowserBox->addRow(strprintf("@@use|%s@@", _("Unequip"))); + mBrowserBox->addRow(strprintf("@@equip|%s@@", _("Unequip"))); else - mBrowserBox->addRow(strprintf("@@use|%s@@", _("Equip"))); + mBrowserBox->addRow(strprintf("@@equip|%s@@", _("Equip"))); } - else - mBrowserBox->addRow(strprintf("@@use|%s@@", _("Use"))); + if (item->getInfo().getActivatable()) + mBrowserBox->addRow(strprintf("@@activate|%s@@", _("Activate"))); if (item->getQuantity() > 1) mBrowserBox->addRow(strprintf("@@drop|%s@@", _("Drop..."))); |