summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-16 02:50:13 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-16 02:50:13 +0300
commita9ddb1992d186d559f24370a33a987e281c134c5 (patch)
treee661ef11486bdfde907b6bf5dee0c4988911ddb9 /src/gui
parenta44ad060d637ec363100d05ffc5a11fb52fef4af (diff)
downloadmanaplus-a9ddb1992d186d559f24370a33a987e281c134c5.tar.gz
manaplus-a9ddb1992d186d559f24370a33a987e281c134c5.tar.bz2
manaplus-a9ddb1992d186d559f24370a33a987e281c134c5.tar.xz
manaplus-a9ddb1992d186d559f24370a33a987e281c134c5.zip
Hide screen buttons and joystick if setup window is opened.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup.cpp23
-rw-r--r--src/gui/setup.h2
2 files changed, 9 insertions, 16 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 9677e052a..ab7179257 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -26,6 +26,7 @@
#include "configuration.h"
#include "game.h"
#include "main.h"
+#include "touchmanager.h"
#include "gui/setup_audio.h"
#include "gui/setup_chat.h"
@@ -209,22 +210,12 @@ void Setup::activateTab(const std::string &name)
{
std::string tmp = gettext(name.c_str());
mPanel->setSelectedTabByName(tmp);
-/*
- for (std::list<SetupTab*>::const_iterator it = mTabs.begin();
- it != mTabs.end(); ++it)
- {
- if (*it)
- {
- SetupTab *tab = *it;
- logger->log("check tab: " + tab->getName());
- if (tab->getName() == tmp)
- {
- mPanel->setSelectedTabByName(name);
- return;
- }
- }
- }
-*/
+}
+
+void Setup::setVisible(bool visible)
+{
+ touchManager.setTempHide(visible);
+ Window::setVisible(visible);
}
Setup *setupWindow;
diff --git a/src/gui/setup.h b/src/gui/setup.h
index ef6521700..51a4e5c26 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -76,6 +76,8 @@ class Setup final : public Window, public gcn::ActionListener
void activateTab(const std::string &name);
+ void setVisible(bool visible) override;
+
private:
std::list<SetupTab*> mTabs;
std::list<Window*> mWindowsToReset;