From a1e8fc08282d11b0132670cf1bfde2b7fe989dc2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Jun 2012 15:57:03 +0300 Subject: Hide bot checker window by default. --- src/gui/windowmenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/windowmenu.cpp') 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(); -- cgit v1.2.3-60-g2f50