From 65d6e86c20604e76ac0de46e54bf5571c570fd53 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 Apr 2011 05:32:41 +0300 Subject: Add reset yellow bar command to bars context menu. --- src/gui/popupmenu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gui/popupmenu.cpp') diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 06ee9a9b8..7b0688587 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -1261,6 +1261,10 @@ void PopupMenu::handleLink(const std::string &link, socialWindow->updateAttackFilter(); } } + else if (link == "reset yellow") + { + player_node->resetYellowBar(); + } else if (link == "guild-pos" && !mNick.empty()) { showChangePos(getX(), getY()); @@ -1539,7 +1543,7 @@ void PopupMenu::showPopup(int x, int y, Button *button) mBrowserBox->clearRows(); std::list names = windowMenu->getButtons(); std::list ::iterator it, it_end; - for (it = names.begin(), it_end = names.end(); it != it_end; ++it) + for (it = names.begin(), it_end = names.end(); it != it_end; ++ it) { Button *btn = dynamic_cast(*it); if (!btn || btn->getActionEventId() == "SET") @@ -1592,6 +1596,9 @@ void PopupMenu::showPopup(int x, int y, ProgressBar *b) } } + mBrowserBox->addRow("##3---"); + mBrowserBox->addRow(strprintf("@@reset yellow|%s@@", + _("Reset yellow bar"))); mBrowserBox->addRow("##3---"); mBrowserBox->addRow(strprintf("@@cancel|%s@@", _("Cancel"))); -- cgit v1.2.3-60-g2f50