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

Method Stop

ogsr_engine/xrGame/ui/UIGameTutorialVideoItem.cpp:203–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203bool CUISequenceVideoItem::Stop(bool bForce)
204{
205 if (!m_flags.test(etiCanBeStopped) && !bForce && IsPlaying())
206 return false;
207
208 m_flags.set(etiPlaying, FALSE);
209
210 m_wnd->Show(false);
211 m_owner->MainWnd()->DetachChild(m_wnd);
212
213 for (auto& snd : m_sounds)
214 snd.stop();
215
216 m_texture->ResetTexture();
217
218 if (m_flags.test(etiNeedPauseOn) && !m_flags.test(etiStoredPauseState))
219 Device.Pause(FALSE, TRUE, TRUE, "videoitem_stop");
220
221 if (m_flags.test(etiNeedPauseOff) && m_flags.test(etiStoredPauseState))
222 Device.Pause(TRUE, TRUE, TRUE, "videoitem_stop");
223
224 if (m_flags.test(etiNeedPauseSound))
225 Device.Pause(FALSE, FALSE, TRUE, "videoitem_stop");
226
227 inherited::Stop();
228 return true;
229}

Callers

nothing calls this directly

Calls 10

MainWndMethod · 0.80
ResetTextureMethod · 0.80
IsPlayingFunction · 0.50
StopFunction · 0.50
testMethod · 0.45
setMethod · 0.45
ShowMethod · 0.45
DetachChildMethod · 0.45
stopMethod · 0.45
PauseMethod · 0.45

Tested by

no test coverage detected