From c845e800f0d4b17bc5ce65806fa5fadd9468c858 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 2 Apr 2012 04:43:18 +0300 Subject: Change auto hide screen buttons to 3 states (always show, hide in small window, always hide) --- src/gui/windowmenu.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gui/windowmenu.cpp') 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"); } -- cgit v1.2.3-70-g09d2