aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz/windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/frotz/windows.cpp')
-rw-r--r--engines/glk/frotz/windows.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index 71f6fb98ea..884d1d709d 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -118,6 +118,31 @@ void Window::setPosition(const Point &newPos) {
_win->setPosition(Point((newPos.x - 1) * g_conf->_monoInfo._cellW, (newPos.y - 1) * g_conf->_monoInfo._cellH));
}
+void Window::setCursor(const Point &newPos) {
+ int x = newPos.x, y = newPos.y;
+
+ if (y < 0) {
+ // Cursor on/off
+ if (y == -2)
+ g_vm->_events->showMouseCursor(true);
+ else if (y == -1)
+ g_vm->_events->showMouseCursor(false);
+ return;
+ }
+
+ if (!x || !y) {
+ update();
+
+ if (!x)
+ x = _properties[X_CURSOR];
+ if (!y)
+ y = _properties[Y_CURSOR];
+ }
+
+ g_vm->glk_window_move_cursor(_win, x - 1, y - 1);
+}
+
+
const uint &Window::getProperty(WindowProperty propType) {
if (_win)
update();