Beispiel #1
0
bool CPetQuit::MouseButtonUpMsg(const Point &pt) {
	CPetControl *pet = getPetControl();
	if (_btnYes.MouseButtonUpMsg(pt) && pet) {
		CGameManager *gameManager = pet->getGameManager();
		if (gameManager)
			gameManager->_gameState._quitGame = true;
		return true;
	} else {
		return false;
	}
}
Beispiel #2
0
bool CRemoteGotoGlyph::MouseButtonUpMsg(const Point &pt) {
	if (!_gfxElement || !_gfxElement->MouseButtonUpMsg(pt))
		return false;

	CPetControl *petControl = getPetControl();
	if (petControl) {
		CGameManager *gameManager = petControl->getGameManager();

		if (gameManager) {
			CRoomItem *room = gameManager->getRoom();

			if (room) {
				CTransportMsg msg(g_vm->_roomNames[_roomIndex], 1, 0);
				msg.execute(room);
			}
		}
	}

	return true;
}