| 375 | } |
| 376 | |
| 377 | sp<Control> ControlGenerator::createAgentIcon(GameState &state, sp<Agent> agent, |
| 378 | UnitSelectionState forcedSelectionState, |
| 379 | bool forceFade) |
| 380 | { |
| 381 | auto info = createAgentInfo(state, agent, forcedSelectionState, forceFade); |
| 382 | auto icon = mksp<Graphic>(); |
| 383 | icon->AutoSize = true; |
| 384 | icon->Name = AGENT_ICON_NAME; |
| 385 | fillAgentControl(state, icon, info); |
| 386 | icon->setData(mksp<CityUnitState>(info.state)); |
| 387 | |
| 388 | return icon; |
| 389 | } |
| 390 | |
| 391 | AgentInfo ControlGenerator::createAgentInfo(GameState &state, sp<Agent> a, |
| 392 | UnitSelectionState forcedSelectionState, bool forceFade) |