MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / AdjustWidthToText

Method AdjustWidthToText

ogsr_engine/xrGame/ui/UIStatic.cpp:599–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599void CUIStatic::AdjustWidthToText()
600{
601 // m_pLines->ParseText(); // надо ли тут парсить текст ?
602 float _len = m_pLines->GetFont()->SizeOf_(m_pLines->GetText());
603 UI()->ClientToScreenScaledWidth(_len);
604 SetWidth(iCeil(_len));
605}
606
607void CUIStatic::SetTextST(LPCSTR str_id) { SetText(*CStringTable().translate(str_id)); }
608

Callers 2

SetHintTextMethod · 0.80
RearrangeTabButtonsFunction · 0.80

Calls 5

UIFunction · 0.85
SizeOf_Method · 0.80
GetFontMethod · 0.45
GetTextMethod · 0.45

Tested by

no test coverage detected