diff options
| author | lukaslw | 2014-06-15 18:18:35 +0200 | 
|---|---|---|
| committer | lukaslw | 2014-06-22 20:09:09 +0200 | 
| commit | 7bc4599dadd0aad7e2bcc4e1d647f04555f377f7 (patch) | |
| tree | 89890e3291fab15bfc12c9a9181b77daca9f9475 | |
| parent | 85108d6fb2ab91a6f9ae15db404f399f846407ee (diff) | |
| download | scummvm-rg350-7bc4599dadd0aad7e2bcc4e1d647f04555f377f7.tar.gz scummvm-rg350-7bc4599dadd0aad7e2bcc4e1d647f04555f377f7.tar.bz2 scummvm-rg350-7bc4599dadd0aad7e2bcc4e1d647f04555f377f7.zip  | |
PRINCE: Cursor fix for inventory - check if voice is playing
| -rw-r--r-- | engines/prince/prince.cpp | 42 | 
1 files changed, 23 insertions, 19 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 0cfe9d6cd6..5cec882c71 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -1857,7 +1857,28 @@ void PrinceEngine::displayInventory() {  	while (!shouldQuit()) { -		// cursor check ! +		if (_textSlots[0]._str != nullptr) { +			changeCursor(0); +		} else { +			changeCursor(_currentPointerNumber); + +			Common::Rect inventoryRect; +			inventoryRect.left = _invX1; +			inventoryRect.top = _invY1; +			inventoryRect.right = _invX1 + _invWidth; +			inventoryRect.bottom = _invY1 + _invHeight; +			Common::Point mousePos = _system->getEventManager()->getMousePos(); + +			if (!_invCurInside && inventoryRect.contains(mousePos)) { +				_invCurInside = true; +			} + +			if (_invCurInside && !inventoryRect.contains(mousePos)) { +				inventoryFlagChange(false); +				_invCurInside = false; +				break; +			} +		}  		rememberScreenInv(); @@ -1868,24 +1889,7 @@ void PrinceEngine::displayInventory() {  		showTexts(_graph->_screenForInventory); -		Common::Rect inventoryRect; -		inventoryRect.left = _invX1; -		inventoryRect.top = _invY1; -		inventoryRect.right = _invX1 + _invWidth; -		inventoryRect.bottom = _invY1 + _invHeight; -		Common::Point mousePos = _system->getEventManager()->getMousePos(); - -		if (!_invCurInside && inventoryRect.contains(mousePos)) { -			_invCurInside = true; -		} - -		if (_invCurInside && !inventoryRect.contains(mousePos)) { -			inventoryFlagChange(false); -			_invCurInside = false; -			break; -		} - -		if (!_optionsFlag) { +		if (!_optionsFlag && _textSlots[0]._str == nullptr) {  			_selectedMob = hotspot(_graph->_screenForInventory, _invMobList);  		}  | 
