Example #1
0
bool CNavigationControllerGlyph::MouseButtonUpMsg(const Point &pt) {
	if (!_gfxElement->MouseButtonUpMsg(pt))
		return false;

	_flag = !_flag;
	CTreeItem *target = getPetControl()->_remoteTarget;
	if (target) {
		CPETHelmetOnOffMsg msg;
		msg.execute(target);
	}

	return true;
}
Example #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(SUPPLY_GALACTIC_REFERENCE);
		}
	} else if (!_btnSetDest.MouseButtonDownMsg(msg->_mousePos)) {
		return elementsMouseDown(msg);
	}

	return true;
}
Example #3
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;
}