aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.h
diff options
context:
space:
mode:
authorCameron Cawley2019-08-09 20:45:27 +0100
committerFilippos Karapetis2019-08-09 23:58:32 +0300
commitfe5dddf901eb40ac3c04b7d01bd078d65dafc5ab (patch)
tree96dff48a310a3873fb9fc6cb48454997a26aba17 /graphics/cursorman.h
parent4667aae4c407a3a54f44e07227897cf077f82fe2 (diff)
downloadscummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.tar.gz
scummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.tar.bz2
scummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.zip
GRAPHICS: Add a version of CursorManager::replaceCursor that accepts a Graphics::Cursor
Diffstat (limited to 'graphics/cursorman.h')
-rw-r--r--graphics/cursorman.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index f4a0ebbd82..68f27b18f5 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -26,6 +26,7 @@
#include "common/scummsys.h"
#include "common/stack.h"
#include "common/singleton.h"
+#include "graphics/cursor.h"
#include "graphics/pixelformat.h"
namespace Graphics {
@@ -100,6 +101,15 @@ public:
void replaceCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
/**
+ * Replace the current cursor on the stack. If the stack is empty, the
+ * cursor is pushed instead. It's a slightly more optimized way of
+ * popping the old cursor before pushing the new one.
+ *
+ * @param cursor the new cursor
+ */
+ void replaceCursor(const Graphics::Cursor *cursor);
+
+ /**
* Pop all of the cursors and cursor palettes from their respective stacks.
* The purpose is to ensure that all unecessary cursors are removed from the
* stack when returning to the launcher from an engine.