MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / OnChildDestroyed

Method OnChildDestroyed

engine/Poseidon/UI/Options/OptionsShell.cpp:283–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 if (auto* page = TopPage())
282 {
283 if (page->OnButtonClicked(*this, idc))
284 return;
285 }
286 // Intercept the dialog-exit IDCs the base ControlsContainer would
287 // turn into an immediate Exit(idc). Defer the Exit until the
288 // notebook close animation has finished — see BeginCloseAnim.
289 if (idc == IDC_OK || idc == IDC_CANCEL)
290 {
291 BeginCloseAnim(idc);
292 return;
293 }
294 Display::OnButtonClicked(idc);
295}
296
297void OptionsShell::BeginCloseAnim(int exitIdc)
298{
299 // If we're already mid-close (defensive — could happen if a page
300 // forwards a second Cancel during the animation), don't restart it.
301 if (_exitWhenClose >= 0)

Callers

nothing calls this directly

Calls 3

ShowCinemaBorderFunction · 0.85
StartRandomCutsceneFunction · 0.85
DestroyMapMethod · 0.80

Tested by

no test coverage detected