PETKA: implemented changing hero to chapayev

This commit is contained in:
Andrei Prykhodko 2019-08-18 17:34:51 +03:00 committed by Eugene Sandulenko
parent 527488d228
commit 4a88f993ff
3 changed files with 13 additions and 1 deletions

View File

@ -130,7 +130,7 @@ void QObjectCase::onMouseMove(int x, int y) {
void QObjectCase::onClick(int x, int y) {
switch (_clickedObjIndex) {
case 0:
// setChapayev()
g_vm->getQSystem()->setChapayev();
break;
case 1:
g_vm->getQSystem()->togglePanelInterface();

View File

@ -224,4 +224,14 @@ void QSystem::toggleMapInterface() {
}
}
void QSystem::setChapayev() {
if (_star->_isActive && _currInterface == _mainInterface.get() && _chapayev->_isShown) {
_cursor->show(false);
_cursor->_resourceId = 5007;
_cursor->returnInvItem();
_cursor->_actionType = kActionObjUseChapayev;
_cursor->show(true);
}
}
}

View File

@ -62,6 +62,8 @@ public:
void togglePanelInterface();
void toggleMapInterface();
void setChapayev();
public:
Common::Array<QObject> _objs;
Common::Array<QObjectBG> _bgs;