mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
PRINCE: Cursor fix for inventory - check if voice is playing
This commit is contained in:
+23
-19
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user