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

Method InitFrameLine

ogsr_engine/xrGame/ui/UIXmlInit.cpp:897–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

895//////////////////////////////////////////////////////////////////////////
896
897bool CUIXmlInit::InitFrameLine(CUIXml& xml_doc, const char* path, int index, CUIFrameLineWnd* pWnd)
898{
899 R_ASSERT2(xml_doc.NavigateToNode(path, index), "XML node not found");
900
901 string256 buf;
902
903 float x = xml_doc.ReadAttribFlt(path, index, "x");
904 float y = xml_doc.ReadAttribFlt(path, index, "y");
905
906 InitAlignment(xml_doc, path, index, x, y, pWnd);
907
908 float width = xml_doc.ReadAttribFlt(path, index, "width");
909 float height = xml_doc.ReadAttribFlt(path, index, "height");
910 bool vertical = !!xml_doc.ReadAttribInt(path, index, "vertical");
911
912 strconcat(sizeof(buf), buf, path, ":texture");
913 shared_str base_name = xml_doc.Read(buf, index, NULL);
914
915 VERIFY(base_name);
916 /* {
917 pWnd->Init(x, y, width, height);
918 return true;
919 }
920 */
921 u32 color = GetColor(xml_doc, buf, index, 0xff);
922 pWnd->SetColor(color);
923
924 pWnd->Init(*base_name, x, y, width, height, !vertical);
925
926 strconcat(sizeof(buf), buf, path, ":title");
927 if (xml_doc.NavigateToNode(buf, index))
928 InitStatic(xml_doc, buf, index, &pWnd->UITitleText);
929
930 return true;
931}
932
933bool CUIXmlInit::InitLabel(CUIXml& xml_doc, const char* path, int index, CUILabel* pWnd)
934{

Callers 10

InitMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45
CUIButtonHintMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45
InitMethod · 0.45

Calls 7

GetColorFunction · 0.85
NavigateToNodeMethod · 0.80
ReadAttribFltMethod · 0.80
ReadAttribIntMethod · 0.80
ReadMethod · 0.45
SetColorMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected