PETKA: update cursor when picking item

This commit is contained in:
Andrei Prykhodko 2022-02-08 21:38:39 +02:00
parent 21c9bb7c8e
commit cad05c054e
4 changed files with 12 additions and 4 deletions

View File

@ -87,10 +87,7 @@ void DialogInterface::restoreCursor() {
cursor->_actionType = _savedCursorActType;
// original bug fix
Common::Event ev;
ev.type = Common::EVENT_MOUSEMOVE;
ev.mouse = g_system->getEventManager()->getMousePos();
_qsys->onEvent(ev);
g_vm->pushMouseMoveEvent();
}
void DialogInterface::next(int choice) {

View File

@ -90,6 +90,8 @@ void QMessageObject::processMessage(const QMessage &msg) {
switch (msg.opcode) {
case kAddInv:
g_vm->getQSystem()->getCase()->addItem(msg.objId);
// original bug fix
g_vm->pushMouseMoveEvent();
break;
case kDelInv:
g_vm->getQSystem()->getCase()->removeItem(msg.objId);

View File

@ -329,4 +329,11 @@ void PetkaEngine::pauseEngineIntern(bool pause) {
Engine::pauseEngineIntern(pause);
}
void PetkaEngine::pushMouseMoveEvent() {
Common::Event ev;
ev.type = Common::EVENT_MOUSEMOVE;
ev.mouse = g_system->getEventManager()->getMousePos();
_eventMan->pushEvent(ev);
}
} // End of namespace Petka

View File

@ -112,6 +112,8 @@ public:
Graphics::Font *getTextFont() const { return _textFont.get(); }
Graphics::Font *getDescriptionFont() const { return _descriptionFont.get(); }
void pushMouseMoveEvent();
Common::Error loadGameState(int slot) override;
bool canLoadGameStateCurrently() override;