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

Method createAgentIcon

game/ui/components/controlgenerator.cpp:377–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377sp<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
391AgentInfo ControlGenerator::createAgentInfo(GameState &state, sp<Agent> a,
392 UnitSelectionState forcedSelectionState, bool forceFade)

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.80

Tested by

no test coverage detected