diff options
author | Paul Gilbert | 2019-02-23 16:30:58 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-02-23 16:31:08 -0800 |
commit | 4efa9c73d4141116892ee1cf732cdfbc259821e4 (patch) | |
tree | 7f368ac5658b86a3fce9b3783f790e1616054618 /engines/glk/frotz/windows.cpp | |
parent | 5f520aa386d829f2bbb168f31318f3422ecf01f1 (diff) | |
download | scummvm-rg350-4efa9c73d4141116892ee1cf732cdfbc259821e4.tar.gz scummvm-rg350-4efa9c73d4141116892ee1cf732cdfbc259821e4.tar.bz2 scummvm-rg350-4efa9c73d4141116892ee1cf732cdfbc259821e4.zip |
GLK: FROTZ: Add V6 text cursor logic
Diffstat (limited to 'engines/glk/frotz/windows.cpp')
-rw-r--r-- | engines/glk/frotz/windows.cpp | 25 |
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(); |