summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-24 05:32:41 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-24 05:32:41 +0300
commit65d6e86c20604e76ac0de46e54bf5571c570fd53 (patch)
treea9487422a0a2e1a7be8db5a1ade415b8011dfe0f /src/gui/popupmenu.cpp
parentccb35758a391807322265994b1712c8d7ed2d16c (diff)
downloadplus-65d6e86c20604e76ac0de46e54bf5571c570fd53.tar.gz
plus-65d6e86c20604e76ac0de46e54bf5571c570fd53.tar.bz2
plus-65d6e86c20604e76ac0de46e54bf5571c570fd53.tar.xz
plus-65d6e86c20604e76ac0de46e54bf5571c570fd53.zip
Add reset yellow bar command to bars context menu.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp9
1 files changed, 8 insertions, 1 deletions
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 <gcn::Button*> names = windowMenu->getButtons();
std::list <gcn::Button*>::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<Button*>(*it);
if (!btn || btn->getActionEventId() == "SET")
@@ -1593,6 +1597,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")));
showPopup(x, y);