diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-13 03:17:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-13 03:17:37 +0300 |
commit | d74ca472f54ae0f5c69ba6a377d896234725df70 (patch) | |
tree | 4438bbdfee04d6c8f8da621fe13fe65626837e8d /src | |
parent | 0a7725600eecd8491f3c814110bb434824e71252 (diff) | |
download | manaplus-d74ca472f54ae0f5c69ba6a377d896234725df70.tar.gz manaplus-d74ca472f54ae0f5c69ba6a377d896234725df70.tar.bz2 manaplus-d74ca472f54ae0f5c69ba6a377d896234725df70.tar.xz manaplus-d74ca472f54ae0f5c69ba6a377d896234725df70.zip |
Remove second use/equip button from inventory.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inventorywindow.cpp | 15 | ||||
-rw-r--r-- | src/gui/inventorywindow.h | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 8c59d10eb..98d029be4 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -169,7 +169,6 @@ InventoryWindow::InventoryWindow(Inventory *inventory): } mUseButton = new Button(longestUseString, "use", this); - mUseButton2 = new Button(longestUseString, "equip", this); mDropButton = new Button(_("Drop..."), "drop", this); mSplitButton = new Button(_("Split"), "split", this); mOutfitButton = new Button(_("Outfits"), "outfit", this); @@ -190,8 +189,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory): place(0, 2, invenScroll, 11).setPadding(3); place(0, 3, mUseButton); - place(1, 3, mUseButton2); - place(2, 3, mDropButton); + place(1, 3, mDropButton); place(8, 3, mSplitButton); place(9, 3, mShopButton); place(10, 3, mOutfitButton); @@ -525,8 +523,6 @@ void InventoryWindow::updateButtons(Item *item) { if (mUseButton) mUseButton->setEnabled(true); - if (mUseButton2) - mUseButton2->setEnabled(true); if (mDropButton) mDropButton->setEnabled(true); return; @@ -534,8 +530,6 @@ void InventoryWindow::updateButtons(Item *item) if (mUseButton) mUseButton->setEnabled(true); - if (mUseButton2) - mUseButton2->setEnabled(true); if (mDropButton) mDropButton->setEnabled(true); @@ -545,15 +539,10 @@ void InventoryWindow::updateButtons(Item *item) mUseButton->setCaption(_("Unequip")); else mUseButton->setCaption(_("Equip")); - mUseButton2->setCaption(_("Use")); } - else if (mUseButton2) + else { mUseButton->setCaption(_("Use")); - if (item->isEquipped()) - mUseButton2->setCaption(_("Unequip")); - else - mUseButton2->setCaption(_("Equip")); } updateDropButton(); diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 08456ba29..a1ecd104c 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -151,7 +151,7 @@ class InventoryWindow : public Window, std::string mWeight, mSlots; - gcn::Button *mUseButton, *mUseButton2, *mDropButton, + gcn::Button *mUseButton, *mDropButton, *mSplitButton, *mOutfitButton, *mShopButton, *mStoreButton, *mRetrieveButton, *mCloseButton; |