diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-02 04:43:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-02 04:43:18 +0300 |
commit | c845e800f0d4b17bc5ce65806fa5fadd9468c858 (patch) | |
tree | a6bc48691aba3a2dd0e88aa18bc3a17a842bf76b /src/gui/windowmenu.cpp | |
parent | bebb93a423a9f6bc7a2b7a610548da6ceaacee97 (diff) | |
download | manaverse-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.gz manaverse-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.bz2 manaverse-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.xz manaverse-c845e800f0d4b17bc5ce65806fa5fadd9468c858.zip |
Change auto hide screen buttons to 3 states
(always show, hide in small window, always hide)
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r-- | src/gui/windowmenu.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index c57cd8974..6133c69e0 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -60,7 +60,7 @@ extern Window *socialWindow; WindowMenu::WindowMenu(): mEmotePopup(nullptr), mHaveMouse(false), - mAutoHide(true) + mAutoHide(1) { int x = 0, h = 0; @@ -114,7 +114,7 @@ WindowMenu::WindowMenu(): setVisible(true); config.addListener("autohideButtons", this); - mAutoHide = config.getBoolValue("autohideButtons"); + mAutoHide = config.getIntValue("autohideButtons"); } WindowMenu::~WindowMenu() @@ -401,12 +401,15 @@ void WindowMenu::saveButtons() void WindowMenu::drawChildren(gcn::Graphics* graphics) { - if (!mAutoHide || mHaveMouse) + if (mHaveMouse || !mAutoHide || (mAutoHide == 1 + && mainGraphics && mainGraphics->mWidth > 800)) + { Container::drawChildren(graphics); + } } void WindowMenu::optionChanged(const std::string &name) { if (name == "autohideButtons") - mAutoHide = config.getBoolValue("autohideButtons"); + mAutoHide = config.getIntValue("autohideButtons"); } |