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

Method FillMasterPart

ogsr_engine/xrGame/ui/UIActorInfo.cpp:145–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void CUIActorInfoWnd::FillMasterPart(CUIXml* xml, const shared_str& key_name)
146{
147 CUIActorStaticticHeader* itm = xr_new<CUIActorStaticticHeader>(this);
148 string128 buff;
149 strconcat(sizeof(buff), buff, "actor_stats_wnd:master_part_", key_name.c_str());
150 itm->Init(xml, buff, 0);
151
152 if (key_name != "foo")
153 {
154 if (key_name == "reputation")
155 {
156 itm->m_text2->SetTextST(InventoryUtilities::GetReputationAsText(Actor()->Reputation()));
157 itm->m_text2->SetTextColor(InventoryUtilities::GetReputationColor(Actor()->Reputation()));
158 }
159 else
160 {
161 s32 _totl = Actor()->StatisticMgr().GetSectionPoints(key_name);
162
163 if (_totl == -1)
164 {
165 itm->m_text2->SetTextST("");
166 }
167 else
168 {
169 sprintf_s(buff, "%d", _totl);
170 itm->m_text2->SetTextST(buff);
171 }
172 }
173 }
174 UIMasterList->AddWindow(itm, true);
175}
176
177void CUIActorInfoWnd::FillPointsDetail(const shared_str& id)
178{

Callers

nothing calls this directly

Calls 8

ActorFunction · 0.85
SetTextSTMethod · 0.80
GetSectionPointsMethod · 0.80
AddWindowMethod · 0.80
c_strMethod · 0.45
InitMethod · 0.45
ReputationMethod · 0.45
SetTextColorMethod · 0.45

Tested by

no test coverage detected