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

Method Update

ogsr_engine/xrGame/ui/UIGameTutorialSimpleItem.cpp:151–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void CUISequenceSimpleItem::Update()
152{
153 float gt = float(Device.dwTimeContinual) / 1000.0f;
154 SubItemVecIt _I = m_subitems.begin();
155 SubItemVecIt _E = m_subitems.end();
156 for (; _I != _E; ++_I)
157 {
158 SSubItem& s = *_I;
159 bool bPlaying = (gt > (m_time_start + s.m_start)) && (gt < (m_time_start + s.m_start + s.m_length));
160 if (true == bPlaying && (false == s.m_visible))
161 s.Start();
162 else if ((false == bPlaying) && (true == s.m_visible))
163 s.Stop();
164 }
165
166 if (g_pGameLevel)
167 {
168 CUIGameSP* ui_game_sp = smart_cast<CUIGameSP*>(HUD().GetUI()->UIGame());
169
170 if (ui_game_sp)
171 {
172 if (!m_pda_section || 0 == xr_strlen(m_pda_section))
173 if (ui_game_sp->PdaMenu->IsShown() || ui_game_sp->InventoryMenu->IsShown() || ui_game_sp->TalkMenu->IsShown() || ui_game_sp->UICarBodyMenu->IsShown() ||
174 ui_game_sp->UIChangeLevelWnd->IsShown())
175 m_UIWindow->Show(false);
176 else
177 m_UIWindow->Show(true);
178 }
179 }
180}
181
182void CUISequenceSimpleItem::Start()
183{

Callers

nothing calls this directly

Calls 9

UIGameMethod · 0.80
GetUIMethod · 0.80
IsShownMethod · 0.80
xr_strlenFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
StartMethod · 0.45
StopMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected