aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/cursorman.cpp')
-rw-r--r--graphics/cursorman.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index ba7c6dee9b..fe5f653b94 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -83,6 +83,24 @@ void CursorManager::popCursor() {
g_system->showMouse(isVisible());
}
+
+void CursorManager::popAllCursors() {
+ while (!_cursorStack.empty()) {
+ Cursor *cur = _cursorStack.pop();
+ delete cur;
+ }
+
+ if (g_system->hasFeature(OSystem::kFeatureCursorHasPalette)) {
+ while (!_cursorPaletteStack.empty()) {
+ Palette *pal = _cursorPaletteStack.pop();
+ delete pal;
+ }
+ }
+
+ g_system->showMouse(isVisible());
+}
+
+
void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetScale) {
if (_cursorStack.empty()) {
pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, targetScale);