| 47 | LocationScreen::~LocationScreen() = default; |
| 48 | |
| 49 | void LocationScreen::begin() |
| 50 | { |
| 51 | auto agentAssignmentPlaceholder = menuform->findControlTyped<Graphic>("AGENT_ASSIGNMENT"); |
| 52 | agentAssignment = menuform->createChild<AgentAssignment>(state); |
| 53 | agentAssignment->init(ui().getForm("city/agentassignment"), |
| 54 | agentAssignmentPlaceholder->Location, agentAssignmentPlaceholder->Size); |
| 55 | if (building) |
| 56 | { |
| 57 | menuform->findControlTyped<Label>("TEXT_OWNER_NAME")->setText(tr(building->owner->name)); |
| 58 | agentAssignment->setLocation(building); |
| 59 | } |
| 60 | else if (agent) |
| 61 | { |
| 62 | menuform->findControlTyped<Label>("TEXT_OWNER_NAME")->setText(tr(agent->owner->name)); |
| 63 | agentAssignment->setLocation(agent); |
| 64 | } |
| 65 | else if (vehicle) |
| 66 | { |
| 67 | menuform->findControlTyped<Label>("TEXT_OWNER_NAME")->setText(tr(vehicle->owner->name)); |
| 68 | agentAssignment->setLocation(vehicle); |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | LogError("Nothing set as owner in LocationScreen?"); |
| 73 | } |
| 74 | menuform->findControlTyped<Label>("TEXT_FUNDS")->setText(state->getPlayerBalance()); |
| 75 | } |
| 76 | |
| 77 | void LocationScreen::pause() {} |
| 78 |
nothing calls this directly
no test coverage detected