MCPcopy Create free account
hub / github.com/ZDoom/Raze / Close

Method Close

source/common/menu/menu.cpp:348–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void DMenu::Close ()
349{
350 if (CurrentMenu == nullptr) return; // double closing can happen in the save menu.
351 assert(CurrentMenu == this);
352 CurrentMenu = mParentMenu;
353
354 if (CurrentMenu != nullptr)
355 {
356 GC::WriteBarrier(CurrentMenu);
357 IFVIRTUALPTR(CurrentMenu, DMenu, OnReturn)
358 {
359 VMValue params[] = { CurrentMenu };
360 VMCall(func, params, 1, nullptr, 0);
361 }
362 if (transition.StartTransition(this, CurrentMenu, MA_Return))
363 {
364 return;
365 }
366 }
367
368 Destroy();
369 if (CurrentMenu == nullptr)
370 {
371 M_ClearMenus();
372 }
373}
374
375
376static void Close(DMenu *menu)

Callers 7

ReadSavegameFunction · 0.45
ReadSaveStringsMethod · 0.45
OpenSoundFontMethod · 0.45
UpdateJoystickMenuFunction · 0.45
CloseFunction · 0.45
LoadMethod · 0.45

Calls 2

M_ClearMenusFunction · 0.85
StartTransitionMethod · 0.80

Tested by

no test coverage detected