diff options
| -rw-r--r-- | engines/groovie/script.cpp | 13 | ||||
| -rw-r--r-- | engines/groovie/script.h | 3 | 
2 files changed, 9 insertions, 7 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;  		}  	}  } 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; | 
