mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- added an option to add elements to an existing options menu.
Note that for list menus this does not exist because they require complete setup to work as intended.
This commit is contained in:
parent
720e05d131
commit
0c660ff29c
1 changed files with 23 additions and 0 deletions
|
@ -871,6 +871,25 @@ static void ParseOptionMenu(FScanner &sc)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
static void ParseAddOptionMenu(FScanner &sc)
|
||||
{
|
||||
sc.MustGetString();
|
||||
|
||||
DMenuDescriptor **pOld = MenuDescriptors.CheckKey(sc.String);
|
||||
if (pOld == nullptr || *pOld == nullptr || !(*pOld)->IsKindOf(RUNTIME_CLASS(DOptionMenuDescriptor)))
|
||||
{
|
||||
sc.ScriptError("%s is not an option menu that can be extended", sc.String);
|
||||
}
|
||||
ParseOptionMenuBody(sc, (DOptionMenuDescriptor*)(*pOld));
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//
|
||||
|
@ -935,6 +954,10 @@ void M_ParseMenuDefs()
|
|||
{
|
||||
ParseOptionMenu(sc);
|
||||
}
|
||||
else if (sc.Compare("ADDOPTIONMENU"))
|
||||
{
|
||||
ParseAddOptionMenu(sc);
|
||||
}
|
||||
else if (sc.Compare("DEFAULTOPTIONMENU"))
|
||||
{
|
||||
ParseOptionMenuBody(sc, DefaultOptionMenuSettings);
|
||||
|
|
Loading…
Reference in a new issue