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

Function TriSetLanguage

engine/Poseidon/Game/Commands/GameStateExtTest.cpp:1556–1563  ·  view source on GitHub ↗

triSetLanguage "lang" — switch stringtable column and fire language-changed callbacks. Returns true if the call succeeded (or was a no-op on same language), false on empty/invalid input.

Source from the content-addressed store, hash-verified

1554 if (!display)
1555 return GameValue("FAIL:no active display");
1556 auto* inner = dynamic_cast<Control*>(display->GetCtrl(innerIdc));
1557 auto* anchor = dynamic_cast<Control*>(display->GetCtrl(anchorIdc));
1558 if (!inner)
1559 return GameValue("FAIL:inner not found");
1560 if (!anchor)
1561 return GameValue("FAIL:anchor not found");
1562
1563 const float dy = inner->Y() - anchor->Y();
1564 const float rowTol = anchor->H() * 0.5f;
1565 const float gap = anchor->X() - (inner->X() + inner->W());
1566 char buf[192];

Callers

nothing calls this directly

Calls 3

SetLanguageFunction · 0.85
RStringClass · 0.50
GameValueClass · 0.50

Tested by

no test coverage detected