Exemplo n.º 1
0
void GlobeGame::handleInput(const Input &input, const Hotspot *cursorSpot) {
	Common::Point where;
	input.getInputLocation(where);
	Hotspot *spot = g_allHotspots.findHotspot(where);

	if (((PegasusEngine *)g_engine)->_cursor->isVisible() && spot != 0 &&
			spot->getObjectID() == kNorad79SiloAreaSpotID && findClickedSilo(input) != -1) {
		_targetHighlightUpperLeft.show();
		_targetHighlightUpperRight.show();
		_targetHighlightLowerLeft.show();
		_targetHighlightLowerRight.show();
	} else {
		_targetHighlightUpperLeft.hide();
		_targetHighlightUpperRight.hide();
		_targetHighlightLowerLeft.hide();
		_targetHighlightLowerRight.hide();
	}

	// Interrupt certain inputs to prevent player from switching modes.
	InputHandler::handleInput(input, cursorSpot);
}
Exemplo n.º 2
0
HotSpotID HotspotList::findHotspotID(const Common::Point where) {
	Hotspot *hotspot = findHotspot(where);
	return hotspot ? hotspot->getObjectID() : kNoHotSpotID;
}