Esempio n. 1
0
bool CPetStarfield::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	if (!_petControl->_remoteTarget)
		return false;

	if (_imgStarfield.MouseButtonDownMsg(msg->_mousePos)) {
		CPETHelmetOnOffMsg helmetMsg;
		helmetMsg.execute(_petControl->_remoteTarget);
	} else if (_imgPhoto.MouseButtonDownMsg(msg->_mousePos)) {
		if (_hasReference) {
			_photoOn = !_photoOn;
			CPETPhotoOnOffMsg photoMsg;
			photoMsg.execute(_petControl->_remoteTarget);
		} else {
			_petControl->displayMessage(SUPPLY_GALACTIC_REFERENCE);
		}
	} else if (!_btnSetDest.MouseButtonDownMsg(msg->_mousePos)) {
		return elementsMouseDown(msg);
	}

	return true;
}
Esempio n. 2
0
bool CPetStarfield::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	if (!_petControl->_remoteTarget)
		return false;

	if (_imgStarfield.MouseButtonDownMsg(msg->_mousePos)) {
		CPETHelmetOnOffMsg helmetMsg;
		helmetMsg.execute(_petControl->_remoteTarget);
	} else if (_imgPhoto.MouseButtonDownMsg(msg->_mousePos)) {
		if (_hasReference) {
			_photoOn = !_photoOn;
			CPETPhotoOnOffMsg photoMsg;
			photoMsg.execute(_petControl->_remoteTarget);
		} else {
			_petControl->displayMessage("Please supply Galactic reference material.");
		}
	} else if (!_btnSetDest.MouseButtonDownMsg(msg->_mousePos)) {
		return elementsMouseDown(msg);
	}

	return true;
}