diff options
author | peavey <peavey@inspircd.org> | 2009-05-11 00:26:14 +0200 |
---|---|---|
committer | peavey <peavey@inspircd.org> | 2009-05-11 00:26:14 +0200 |
commit | ebefed376b4858e8638f97cf36e95f6e8c047f24 (patch) | |
tree | 55920a9546c5174a96e7c8472d5cef51805dcb0d /src/gui/minimap.cpp | |
parent | a8ebfe6bd3b6c6a7b14dacbdb84ac5b727aca84a (diff) | |
download | mana-ebefed376b4858e8638f97cf36e95f6e8c047f24.tar.gz mana-ebefed376b4858e8638f97cf36e95f6e8c047f24.tar.bz2 mana-ebefed376b4858e8638f97cf36e95f6e8c047f24.tar.xz mana-ebefed376b4858e8638f97cf36e95f6e8c047f24.zip |
Fix a few states on minimap that I missed. mShow now replaces the visibility setting since this is only saved on manually setting visibility. go back to saving visibility and use sticky bit to decide if minimap should be turned off or not.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index aa06da31..17a7e82a 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -56,13 +56,13 @@ Minimap::Minimap(): setResizable(false); setDefaultVisible(true); - setSaveVisible(false); + setSaveVisible(true); setStickyButton(true); setSticky(false); loadWindowState(); - setVisible(mShow); + setVisible(mShow, isSticky()); } Minimap::~Minimap() @@ -94,9 +94,6 @@ void Minimap::setMap(Map *map) ResourceManager *resman = ResourceManager::getInstance(); mMapImage = resman->getImage(map->getProperty("minimap")); - if (!mShow) - return; - if (mMapImage) { const int offsetX = 2 * getPadding(); @@ -120,17 +117,19 @@ void Minimap::setMap(Map *map) setDefaultSize(getX(), getY(), getWidth(), getHeight()); resetToDefaultSize(); - setVisible(true); + if (mShow) + setVisible(true); } else { - setVisible(false); + if (!isSticky()) + setVisible(false); } } void Minimap::toggle() { - setVisible(!mShow, isSticky()); + setVisible(!isVisible(), isSticky()); mShow = isVisible(); } |