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

Function ParseAddListMenu

source/common/menu/menudef.cpp:842–853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840//=============================================================================
841
842static void ParseAddListMenu(FScanner& sc)
843{
844 sc.MustGetString();
845
846 DMenuDescriptor** pOld = MenuDescriptors.CheckKey(sc.String);
847 if (pOld == nullptr || *pOld == nullptr || !(*pOld)->IsKindOf(RUNTIME_CLASS(DListMenuDescriptor)))
848 {
849 sc.ScriptError("%s is not a list menu that can be extended", sc.String);
850 return;
851 }
852 ParseListMenuBody(sc, (DListMenuDescriptor*)(*pOld), GetInsertIndex(sc, *pOld));
853}
854
855//=============================================================================
856//

Callers 1

M_ParseMenuDefsFunction · 0.85

Calls 6

ParseListMenuBodyFunction · 0.85
GetInsertIndexFunction · 0.85
MustGetStringMethod · 0.80
IsKindOfMethod · 0.80
CheckKeyMethod · 0.45
ScriptErrorMethod · 0.45

Tested by

no test coverage detected