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

Method InitCharacter

ogsr_engine/xrGame/ui/UIPdaMsgListItem.cpp:50–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48void CUIPdaMsgListItem::SetColor(u32 color) { UIIcon.SetColor(color); }
49
50void CUIPdaMsgListItem::InitCharacter(CInventoryOwner* pInvOwner)
51{
52 VERIFY(pInvOwner);
53
54 string256 str;
55 sprintf_s(str, "name: %s", pInvOwner->Name());
56 UIName.SetText(str);
57
58 UIIcon.InitTexture(pInvOwner->CharacterInfo().IconName().c_str());
59 /*
60 UIIcon.SetShader(GetCharIconsShader());
61 UIIcon.GetUIStaticItem().SetOriginalRect(
62 float(pInvOwner->CharacterInfo().TradeIconX()*ICON_GRID_WIDTH),
63 float(pInvOwner->CharacterInfo().TradeIconY()*ICON_GRID_HEIGHT),
64 float(pInvOwner->CharacterInfo().TradeIconX()+CHAR_ICON_WIDTH*ICON_GRID_WIDTH),
65 float(pInvOwner->CharacterInfo().TradeIconY()+CHAR_ICON_HEIGHT*ICON_GRID_HEIGHT));
66 */
67}

Callers

nothing calls this directly

Calls 4

NameMethod · 0.45
SetTextMethod · 0.45
InitTextureMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected