summaryrefslogtreecommitdiff
path: root/src/gui/windowmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r--src/gui/windowmenu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 0d81ba3a9..487035350 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -99,9 +99,9 @@ WindowMenu::WindowMenu():
KeyboardConfig::KEY_WINDOW_DIDYOUKNOW);
addButton(N_("SET"), _("Setup"), x, h, KeyboardConfig::KEY_WINDOW_SETUP);
- if (graphics)
+ if (mainGraphics)
{
- setDimension(gcn::Rectangle(graphics->mWidth - x - 3,
+ setDimension(gcn::Rectangle(mainGraphics->mWidth - x - 3,
3, x - 3, h));
}
@@ -315,13 +315,13 @@ void WindowMenu::mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED)
mTextPopup->hide();
}
-void WindowMenu::showButton(std::string name, bool isVisible)
+void WindowMenu::showButton(std::string name, bool visible)
{
Button *btn = dynamic_cast<Button*>(mButtonNames[name]);
if (!btn)
return;
- btn->setVisible(isVisible);
+ btn->setVisible(visible);
updateButtons();
saveButtons();
}
@@ -329,7 +329,7 @@ void WindowMenu::showButton(std::string name, bool isVisible)
void WindowMenu::updateButtons()
{
int x = 0, h = 0;
- std::vector <gcn::Button*>::iterator it, it_end;
+ std::vector <gcn::Button*>::const_iterator it, it_end;
for (it = mButtons.begin(), it_end = mButtons.end(); it != it_end; ++it)
safeRemove(*it);
for (it = mButtons.begin(), it_end = mButtons.end(); it != it_end; ++it)
@@ -345,9 +345,9 @@ void WindowMenu::updateButtons()
h = btn->getHeight();
}
}
- if (graphics)
+ if (mainGraphics)
{
- setDimension(gcn::Rectangle(graphics->mWidth - x - 3,
+ setDimension(gcn::Rectangle(mainGraphics->mWidth - x - 3,
3, x - 3, h));
}
}