bool CChevSwitch::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _fieldBC ^= 1; if (getParent()) { CSetChevPanelBitMsg bitMsg(_value, _fieldBC); bitMsg.execute(getParent()); } CSetChevButtonImageMsg chevMsg(_fieldBC, 0); chevMsg.execute(this); return true; }
bool CPetDragChev::MouseDragEndMsg(CMouseDragEndMsg *msg) { CSuccUBus *succubus = dynamic_cast<CSuccUBus *>(msg->_dropTarget); if (succubus) { CSetChevRoomBits chevMsg(_destRoomFlags); chevMsg.execute(succubus); } else { CPetControl *petControl = getPetControl(); if (!petControl || !petControl->contains(msg->_mousePos) || msg->_mousePos.x >= 528 || !petControl->checkDragEnd(this)) petMoveToHiddenRoom(); } return true; }