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 ++++++++- src/gui/setup_video.cpp | 4 +++- src/gui/viewport.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/gui') 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"))); 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; } -- cgit v1.2.3-70-g09d2