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

Method UpdateItemText

ogsr_engine/xrGame/ui/UICellCustomItems.cpp:175–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void CUIAmmoCellItem::UpdateItemText()
176{
177 {
178 u16 total{};
179 if (auto* curr_obj = object())
180 total = curr_obj->m_boxCurr;
181
182 for (auto* child : m_childs)
183 if (auto* _child_obj = smart_cast<CUIAmmoCellItem*>(child))
184 if (auto* child_obj = _child_obj->object())
185 total += child_obj->m_boxCurr;
186
187 string32 str;
188 sprintf_s(str, "%d", total);
189
190 if (Core.Features.test(xrCore::Feature::show_inv_item_condition))
191 {
192 m_text->SetText(str);
193 m_text->Show(true);
194 }
195 else
196 SetText(str);
197 }
198}
199
200CUIWeaponCellItem::CUIWeaponCellItem(CWeapon* itm) : inherited(itm)
201{

Callers

nothing calls this directly

Calls 5

objectFunction · 0.50
objectMethod · 0.45
testMethod · 0.45
SetTextMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected