diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-03 18:00:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-03 18:00:02 +0300 |
commit | 87dc57caff1b01f4abe2cc14bfc56f5bc130fbb6 (patch) | |
tree | 926e4cf6c72f2b9f7ada2a715ca79adc88a53157 /src/gui/windows/inventorywindow.cpp | |
parent | 3a9f3469e65e1c45a8cdf9c6ae21e73c90b87d22 (diff) | |
download | plus-87dc57caff1b01f4abe2cc14bfc56f5bc130fbb6.tar.gz plus-87dc57caff1b01f4abe2cc14bfc56f5bc130fbb6.tar.bz2 plus-87dc57caff1b01f4abe2cc14bfc56f5bc130fbb6.tar.xz plus-87dc57caff1b01f4abe2cc14bfc56f5bc130fbb6.zip |
Add item attribute useButton2 and use it in inventory.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 5a29d5de0..2802a063d 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -642,7 +642,8 @@ void InventoryWindow::updateButtons(const Item *item) if (mUseButton) { const ItemInfo &info = item->getInfo(); - const std::string &str = info.getUseButton(); + const std::string &str = (item->isEquipment() && item->isEquipped()) + ? info.getUseButton2() : info.getUseButton(); if (str.empty()) { mUseButton->setEnabled(false); |