From 7bc4599dadd0aad7e2bcc4e1d647f04555f377f7 Mon Sep 17 00:00:00 2001 From: lukaslw Date: Sun, 15 Jun 2014 18:18:35 +0200 Subject: [PATCH] PRINCE: Cursor fix for inventory - check if voice is playing --- engines/prince/prince.cpp | 42 +++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 0cfe9d6cd64..5cec882c713 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); }