diff options
-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) |