MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / handleClickedOrganisation

Method handleClickedOrganisation

game/ui/tileview/cityview.cpp:462–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462bool CityView::handleClickedOrganisation(StateRef<Organisation> organisation, bool rightClick,
463 CitySelectionState selState [[maybe_unused]])
464{
465 if (rightClick)
466 {
467 tryOpenUfopaediaEntry(organisation->ufopaedia_entry);
468 return true;
469 }
470 else
471 {
472 if (state->current_city->cityViewSelectedOrganisation == organisation)
473 {
474 if (++organisation->lastClickedBuilding >= organisation->buildings.size())
475 {
476 organisation->lastClickedBuilding = 0;
477 }
478 this->setScreenCenterTile(
479 organisation->buildings[organisation->lastClickedBuilding]->crewQuarters);
480 }
481 else
482 {
483 state->current_city->cityViewSelectedOrganisation = organisation;
484 }
485 }
486 return true;
487}
488
489void CityView::showDailyReport()
490{

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
setScreenCenterTileMethod · 0.45

Tested by

no test coverage detected