aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui32
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-07 14:53:15 +0000
committerMartin Kiewitz2009-10-07 14:53:15 +0000
commit1dfe7578cba4894630bd6fa093cfa1607fbdad6e (patch)
treef8b14f9eea63060f11f27fd38320ec3c32d53128 /engines/sci/gui32
parentece4f55db970c27a82d99aac76bc621790478b61 (diff)
downloadscummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.tar.gz
scummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.tar.bz2
scummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.zip
SCI/newgui: kSetCursor (show, hide, pos, shape) implemented
svn-id: r44734
Diffstat (limited to 'engines/sci/gui32')
-rw-r--r--engines/sci/gui32/gui32.cpp16
-rw-r--r--engines/sci/gui32/gui32.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 2248a58455..4fdffe3267 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "graphics/cursorman.h"
#include "common/util.h"
#include "sci/sci.h"
@@ -2002,6 +2003,21 @@ void SciGui32::setNowSeen(reg_t objectReference) {
_k_set_now_seen(objectReference);
}
+void SciGui32::setCursorHide() {
+ CursorMan.showMouse(false);
+}
+
+void SciGui32::setCursorShow() {
+ CursorMan.showMouse(true);
+}
+
+void SciGui32::setCursorShape(GuiResourceId cursorId) {
+ if (cursorId == -1)
+ gfxop_set_pointer_cursor(s->gfx_state, GFXOP_NO_POINTER);
+ else
+ gfxop_set_pointer_cursor(s->gfx_state, cursorId);
+}
+
void SciGui32::setCursorPos(Common::Point pos) {
pos.y += s->port->_bounds.y;
pos.x += s->port->_bounds.x;
diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h
index 5af02a26f7..d9d5909b98 100644
--- a/engines/sci/gui32/gui32.h
+++ b/engines/sci/gui32/gui32.h
@@ -77,6 +77,9 @@ public:
void addToPicView(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
void setNowSeen(reg_t objectReference);
+ void setCursorHide();
+ void setCursorShow();
+ void setCursorShape(GuiResourceId cursorId);
void setCursorPos(Common::Point pos);
void moveCursor(Common::Point pos);