From cd32c4d6bce9b3c32215ba5a29eebec0afcc8d1b Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sat, 15 Nov 2008 11:23:02 +0000 Subject: Fix for bug "Save game's names don't show up" (issue 31 on google code) svn-id: r35078 --- engines/groovie/script.cpp | 13 ++++++++----- engines/groovie/script.h | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'engines/groovie') 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; } } } diff --git a/engines/groovie/script.h b/engines/groovie/script.h index 3d8fda17af..7d1b202776 100644 --- a/engines/groovie/script.h +++ b/engines/groovie/script.h @@ -93,8 +93,7 @@ private: uint16 _hotspotBottomCursor; uint16 _hotspotRightAction; uint16 _hotspotLeftAction; - uint16 _hotspotCursorOldX; - uint16 _hotspotCursorOldY; + uint16 _hotspotSlot; // Video Font *_font; -- cgit v1.2.3