diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-12-26 23:44:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-12-26 23:44:13 +0300 |
commit | c322175764a915968f136d86fb038e2ace057d45 (patch) | |
tree | d949f3c2e662e61ff5f2eade1f1d94f20224b5ef | |
parent | cf542c3602eae931066d8b6e46d90109c8b2c13e (diff) | |
download | mv-c322175764a915968f136d86fb038e2ace057d45.tar.gz mv-c322175764a915968f136d86fb038e2ace057d45.tar.bz2 mv-c322175764a915968f136d86fb038e2ace057d45.tar.xz mv-c322175764a915968f136d86fb038e2ace057d45.zip |
Add clear current outfit option to outfits context menu.
Removed load old outfits option.
-rw-r--r-- | src/gui/outfitwindow.cpp | 9 | ||||
-rw-r--r-- | src/gui/outfitwindow.h | 2 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 12 |
3 files changed, 17 insertions, 6 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index c33c753bc..6e68fad17 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -985,3 +985,12 @@ void OutfitWindow::setItemSelected(Item *item) mItemColorSelected = 1; } } + +void OutfitWindow::clearCurrentOutfit() +{ + for (unsigned f = 0; f < OUTFIT_ITEM_COUNT; f++) + { + mItems[mCurrentOutfit][f] = -1; + mItemColors[mCurrentOutfit][f] = 1; + } +} diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h index 8dd5fd6a3..105f5a0db 100644 --- a/src/gui/outfitwindow.h +++ b/src/gui/outfitwindow.h @@ -108,6 +108,8 @@ class OutfitWindow : public Window, gcn::ActionListener std::string keyName(int number) A_PURE; + void clearCurrentOutfit(); + private: Button *mPreviousButton; Button *mNextButton; diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 283fcb99e..7860f3c04 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -586,7 +586,7 @@ void PopupMenu::showOutfitsPopup(int x, int y) mBrowserBox->clearRows(); mBrowserBox->addRow(_("Outfits")); - mBrowserBox->addRow("load old outfits", _("Load old outfits")); + mBrowserBox->addRow("clear outfit", _("Clear outfit")); mBrowserBox->addRow("##3---"); mBrowserBox->addRow("cancel", _("Cancel")); @@ -1331,11 +1331,6 @@ void PopupMenu::handleLink(const std::string &link, mDialog->setActionEventId("ok"); mDialog->addActionListener(&mRenameListener); } - else if (link == "load old outfits") - { - if (outfitWindow) - outfitWindow->load(true); - } else if (link == "load old spells") { if (spellManager) @@ -1673,6 +1668,11 @@ void PopupMenu::handleLink(const std::string &link, showChangePos(getX(), getY()); return; } + else if (link == "clear outfit") + { + if (outfitWindow) + outfitWindow->clearCurrentOutfit(); + } else if (!link.compare(0, 10, "guild-pos-")) { if (player_node) |