summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-28 10:35:49 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-28 10:35:49 -0600
commit42a095de15649f0f00ef6c681268d6623205900c (patch)
tree1f7d509f088208fd5349e9a77d208637354636f3 /src/gui/minimap.cpp
parentef2e1bafa7c5f19b0353e0bf01a7ad9d7f8cddf5 (diff)
downloadmana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.gz
mana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.bz2
mana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.xz
mana-client-42a095de15649f0f00ef6c681268d6623205900c.zip
Add a sticky button to the Window class
The Minimap window uses this so you can froce it to always be open. The Minimap toggle button can be used to show or hide it temporarily, as warping will reset it's visibility based on the sticky state and weather the 'new' map has a minimap.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r--src/gui/minimap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 75ee7e3d..bfd34390 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -45,6 +45,9 @@ Minimap::Minimap():
setDefaultSize(5, 25, 100, 100);
setResizable(true);
+ setStickyButton(true);
+ setSticky(false);
+
loadWindowState();
}
@@ -92,8 +95,7 @@ void Minimap::setMapImage(Image *img)
void Minimap::toggle()
{
- mShow = ! isVisible();
- setVisible(mShow);
+ setVisible(!isVisible(), true);
}
void Minimap::draw(gcn::Graphics *graphics)