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

Method InitTextureOffset

ogsr_engine/xrGame/ui/UIXmlInit.cpp:1189–1203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1187}
1188
1189bool CUIXmlInit::InitTextureOffset(CUIXml& xml_doc, LPCSTR path, int index, CUIStatic* pWnd)
1190{
1191 string256 textureOffset;
1192 if (0 == xr_strcmp(path, ""))
1193 strcpy_s(textureOffset, "texture_offset");
1194 else
1195 strconcat(sizeof(textureOffset), textureOffset, path, ":texture_offset");
1196
1197 float x = xml_doc.ReadAttribFlt(textureOffset, index, "x");
1198 float y = xml_doc.ReadAttribFlt(textureOffset, index, "y");
1199
1200 pWnd->SetTextureOffset(x, y);
1201
1202 return true;
1203}
1204
1205bool CUIXmlInit::InitMultiTexture(CUIXml& xml_doc, LPCSTR path, int index, CUI3tButton* pWnd)
1206{

Callers

nothing calls this directly

Calls 3

ReadAttribFltMethod · 0.80
xr_strcmpFunction · 0.50
SetTextureOffsetMethod · 0.45

Tested by

no test coverage detected