summaryrefslogtreecommitdiff
path: root/src/gui
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
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')
-rw-r--r--src/gui/popupmenu.cpp9
-rw-r--r--src/gui/setup_video.cpp4
-rw-r--r--src/gui/viewport.h3
3 files changed, 14 insertions, 2 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);
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index a3a82333e..a838befef 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -410,6 +410,8 @@ Setup_Video::Setup_Video():
mDrawHotKeysCheckBox->addKeyListener(this);
mDrawPathCheckBox->addKeyListener(this);
mShowJobCheckBox->addKeyListener(this);
+ mOpenGLDropDown->addActionListener(this);
+
mAlphaCacheCheckBox->addKeyListener(this);
mSpeechLabel->setCaption(speechModeToString(mSpeechMode));
@@ -815,7 +817,7 @@ void Setup_Video::action(const gcn::ActionEvent &event)
}
else if (id == "opengl")
{
- bool isSoftware = mOpenGLDropDown->getSelected();
+ bool isSoftware = (mOpenGLDropDown->getSelected() == 0);
mAlphaCacheCheckBox->setEnabled(isSoftware);
}
}
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index d6e0fc3dc..59db38e4c 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -223,6 +223,9 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int getDebugPath()
{ return mShowDebugPath; }
+ void setDebugPath(int n)
+ { mShowDebugPath = n; }
+
int getCameraMode()
{ return mCameraMode; }