aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/macwindowmanager.cpp5
-rw-r--r--graphics/macgui/macwindowmanager.h23
2 files changed, 27 insertions, 1 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 9e5e8b76c9..6ee92e081e 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -149,7 +149,10 @@ MacWindowManager::MacWindowManager() {
_lastId = 0;
_activeWindow = -1;
+ _mode = kWMModeNone;
+
_menu = 0;
+ _menuDelay = 0;
_fullRefresh = true;
@@ -279,7 +282,7 @@ void MacWindowManager::draw() {
removeMarked();
- if (_fullRefresh)
+ if (_fullRefresh && !(_mode & kWMModeNoDesktop))
drawDesktop();
for (Common::List<BaseMacWindow *>::const_iterator it = _windowStack.begin(); it != _windowStack.end(); it++) {
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index bc0224a321..d2f89361bb 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -55,6 +55,13 @@ enum {
kPatternLightGray = 5,
kPatternDarkGray = 6
};
+
+enum {
+ kWMModeNone = 0,
+ kWMModeNoDesktop = (1 << 0),
+ kWMModeAutohideMenu = (1 << 1)
+};
+
}
using namespace MacGUIConstants;
@@ -132,6 +139,16 @@ public:
* @return Pointer to a new empty menu.
*/
MacMenu *addMenu();
+
+ /**
+ * Set hot zone where menu appears (works only with autohide menu)
+ */
+ void setMenuHotzone(const Common::Rect &rect) { _menuHotzone = rect; }
+
+ /**
+ * Set delay in milliseconds when menu appears (works only with autohide menu)
+ */
+ void setMenuDelay(int delay) { _menuDelay = delay; }
/**
* Set the desired window state to active.
* @param id ID of the window that has to be set to active.
@@ -187,6 +204,8 @@ public:
void pushWatchCursor();
void popCursor();
+ void setMode(uint32 mode) { _mode = mode; }
+
public:
MacFontManager *_fontMan;
@@ -200,6 +219,8 @@ private:
private:
ManagedSurface *_screen;
+ uint32 _mode;
+
Common::List<BaseMacWindow *> _windowStack;
Common::Array<BaseMacWindow *> _windows;
@@ -214,6 +235,8 @@ private:
MacPatterns _patterns;
MacMenu *_menu;
+ Common::Rect _menuHotzone;
+ uint32 _menuDelay;
bool _cursorIsArrow;
};