diff options
Diffstat (limited to 'engines/groovie/script.cpp')
-rw-r--r-- | engines/groovie/script.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index fc4a7fd4f1..4e5c0386c3 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -88,8 +88,7 @@ Script::Script(GroovieEngine *vm) : _hotspotBottomAction = 0; _hotspotRightAction = 0; _hotspotLeftAction = 0; - _hotspotCursorOldX = 1000; - _hotspotCursorOldY = 1000; + _hotspotSlot = (uint16)-1; } Script::~Script() { @@ -1202,9 +1201,12 @@ void Script::o_hotspot_slot() { _font = new Font(_vm->_system); } _font->printstring(savename); + + // Save the currently highlighted slot + _hotspotSlot = slot; } else { Common::Point mousepos = _vm->_system->getEventManager()->getMousePos(); - if (_hotspotCursorOldX != mousepos.x || _hotspotCursorOldY != mousepos.y ) { + if (_hotspotSlot == slot) { Common::Rect topbar(640, 80); Graphics::Surface *gamescreen; @@ -1213,8 +1215,9 @@ void Script::o_hotspot_slot() { gamescreen->fillRect(topbar, 0); _vm->_system->unlockScreen(); - _hotspotCursorOldX = mousepos.x; - _hotspotCursorOldY = mousepos.y; + + // Removing the slot highlight + _hotspotSlot = (uint16)-1; } } } |