summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-03 15:57:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-03 15:57:03 +0300
commita1e8fc08282d11b0132670cf1bfde2b7fe989dc2 (patch)
treefed23de917fee618c66cc3981ab82d6dca0e9de1 /src
parent29ce8ef5e2533a053fcd93ec44fc07e1990ad618 (diff)
downloadmanaplus-a1e8fc08282d11b0132670cf1bfde2b7fe989dc2.tar.gz
manaplus-a1e8fc08282d11b0132670cf1bfde2b7fe989dc2.tar.bz2
manaplus-a1e8fc08282d11b0132670cf1bfde2b7fe989dc2.tar.xz
manaplus-a1e8fc08282d11b0132670cf1bfde2b7fe989dc2.zip
Hide bot checker window by default.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windowmenu.cpp6
-rw-r--r--src/gui/windowmenu.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 6359df7cd..2bebc69a7 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -70,7 +70,7 @@ WindowMenu::WindowMenu():
setFocusable(false);
addButton(N_("BC"), _("Bot checker"), x, h,
- Input::KEY_WINDOW_BOT_CHECKER);
+ Input::KEY_WINDOW_BOT_CHECKER, false);
addButton(N_("ONL"), _("Who is online"), x, h,
Input::KEY_NO_VALUE);
addButton(N_("KS"), _("Kill stats"), x, h,
@@ -257,7 +257,7 @@ void WindowMenu::valueChanged(const gcn::SelectionEvent &event)
}
void WindowMenu::addButton(const char* text, std::string description,
- int &x, int &h, int key)
+ int &x, int &h, int key, bool visible)
{
Button *btn = new Button(gettext(text), text, this);
btn->setPosition(x, 0);
@@ -265,6 +265,8 @@ void WindowMenu::addButton(const char* text, std::string description,
btn->setTag(key);
add(btn);
btn->setFocusable(false);
+ if (!visible)
+ btn->setVisible(false);
mButtons.push_back(btn);
x += btn->getWidth() + 3;
h = btn->getHeight();
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 8c57f368b..01d4e4361 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -84,7 +84,7 @@ class WindowMenu : public Container,
private:
inline void addButton(const char* text, std::string description,
- int &x, int &h, int key);
+ int &x, int &h, int key, bool visible = true);
void updateButtons();