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

Method Update

ogsr_engine/xrGame/ui/UITaskItem.cpp:132–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void CUITaskRootItem::Update()
133{
134 inherited::Update();
135
136 if (m_curr_descr_mode != m_EventsWnd->GetDescriptionMode())
137 {
138 m_curr_descr_mode = m_EventsWnd->GetDescriptionMode();
139 if (m_curr_descr_mode)
140 m_switchDescriptionBtn->InitTexture("ui_icons_newPDA_showtext");
141 else
142 m_switchDescriptionBtn->InitTexture("ui_icons_newPDA_showmap");
143 }
144
145 m_switchDescriptionBtn->SetButtonMode(m_EventsWnd->GetDescriptionMode() ? CUIButton::BUTTON_NORMAL : CUIButton::BUTTON_PUSHED);
146
147 if (m_remTimeStatic->IsShown())
148 {
149 string512 buff, buff2;
150 InventoryUtilities::GetTimePeriodAsString(buff, sizeof(buff), Level().GetGameTime(), GameTask()->m_TimeToComplete);
151 sprintf_s(buff2, "%s %s", *CStringTable().translate("ui_st_time_remains"), buff);
152 m_remTimeStatic->SetText(buff2);
153 }
154}
155
156bool CUITaskRootItem::OnDbClick() { return true; }
157

Callers

nothing calls this directly

Calls 13

UpdateFunction · 0.85
CStringTableClass · 0.85
ActorFunction · 0.85
GetDescriptionModeMethod · 0.80
IsShownMethod · 0.80
atMethod · 0.80
ActiveObjectiveMethod · 0.80
ItemHasDescriptionMethod · 0.80
InitTextureMethod · 0.45
GetGameTimeMethod · 0.45
translateMethod · 0.45
SetTextMethod · 0.45

Tested by

no test coverage detected