MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / AddObjective

Function AddObjective

engine/Poseidon/UI/Map/UIMapDisplayBriefing.cpp:311–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311void AddObjective(CHTMLContainer* html, int src, int dst, int value)
312{
313 if (value == OSHidden)
314 {
315 return;
316 }
317
318 RString picture;
319 switch (value)
320 {
321 case OSDone:
322 picture = "mission_done.paa";
323 break;
324 case OSFailed:
325 picture = "mission_uncomplete.paa";
326 break;
327 default:
328 Fail("Unknown objective type");
329 case OSActive:
330 picture = "mission_dot.paa";
331 break;
332 }
333 html->AddBreak(dst, false);
334 float imgHeight = 640.0f * 1.5 * html->GetPHeight();
335 HTMLField* fld = html->AddImage(dst, picture, HALeft, false, -1, imgHeight, "");
336 fld->exclude = true;
337 float indent = 1.2 * fld->width;
338 html->SetIndent(indent);
339 html->CopySection(src, dst);
340 html->SetIndent(0);
341}
342
343void DisplayMap::UpdatePlan()
344{

Callers 2

CreateDebriefingMethod · 0.85
UpdatePlanMethod · 0.85

Calls 5

AddBreakMethod · 0.80
GetPHeightMethod · 0.80
AddImageMethod · 0.80
SetIndentMethod · 0.80
CopySectionMethod · 0.80

Tested by

no test coverage detected