From 8c3c9df3508bdb18f0b083de93f0e88983660028 Mon Sep 17 00:00:00 2001 From: stevenhoefel Date: Mon, 9 Jan 2017 09:31:48 +1100 Subject: DIRECTOR: System beep and Mouse Cursors. --- graphics/macgui/macwindowmanager.cpp | 70 ++++++++++++++++++++++++++++++++++++ graphics/macgui/macwindowmanager.h | 4 +++ 2 files changed, 74 insertions(+) (limited to 'graphics') diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 42cab7cf8e..bad4ad3acc 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -88,6 +88,60 @@ static const byte macCursorBeam[] = { 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, }; +static const byte macCursorCrossHair[] = { + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const byte macCursorWatch[] = { + 0, 0, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; MacWindowManager::MacWindowManager() { _screen = 0; @@ -327,6 +381,22 @@ void MacWindowManager::pushArrowCursor() { CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3); } +void MacWindowManager::pushBeamCursor() { + CursorMan.pushCursor(macCursorBeam, 11, 16, 1, 1, 3); +} + +void MacWindowManager::pushCrossHairCursor() { + CursorMan.pushCursor(macCursorCrossHair, 11, 16, 1, 1, 3); +} + +void MacWindowManager::pushCrossBarCursor() { + CursorMan.pushCursor(macCursorCrossBar, 11, 16, 1, 1, 3); +} + +void MacWindowManager::pushWatchCursor() { + CursorMan.pushCursor(macCursorWatch, 11, 16, 1, 1, 3); +} + void MacWindowManager::popCursor() { CursorMan.popCursor(); } diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 3449ab13c2..9f62403813 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -146,6 +146,10 @@ public: void drawFilledRoundRect(ManagedSurface *surface, Common::Rect &rect, int arc, int color); void pushArrowCursor(); + void pushBeamCursor(); + void pushCrossHairCursor(); + void pushCrossBarCursor(); + void pushWatchCursor(); void popCursor(); public: -- cgit v1.2.3