From 42a095de15649f0f00ef6c681268d6623205900c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 28 Mar 2009 10:35:49 -0600 Subject: 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. --- src/gui/minimap.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/minimap.cpp') 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) -- cgit v1.2.3-70-g09d2