Adds expanded ability to create and insert specialized script-based inspector fields

Adds logic during the editor script initialization to let game modules have embedded tools
Changed setting to force prompt for target modules when creating things like datablocks to minimize confusion about where they save to
This commit is contained in:
Areloch 2023-03-18 02:22:47 -05:00
parent bb44fa4bb7
commit 2f40b843d4
7 changed files with 131 additions and 5 deletions

View file

@ -805,6 +805,16 @@ S32 GuiInspector::createInspectorGroup(StringTableEntry groupName, S32 index)
return newGroup->getId();
}
void GuiInspector::removeInspectorGroup(StringTableEntry groupName)
{
GuiInspectorGroup* group = findExistentGroup(groupName);
if (group == nullptr)
return;
mGroups.remove(group);
removeObject(group);
}
//=============================================================================
// Console Methods.
//=============================================================================
@ -962,3 +972,10 @@ DefineEngineMethod(GuiInspector, findExistentGroup, S32, (const char* groupName)
GuiInspectorGroup* group = object->findExistentGroup(StringTable->insert(groupName));
return group ? group->getId() : 0;
}
DefineEngineMethod(GuiInspector, removeGroup, void, (const char* groupName), ,
"Finds an existing GuiInspectorGroup if it exists removes it.\n"
"@param groupName Name of the new GuiInspectorGroup to find in this Inspector.")
{
object->removeInspectorGroup(StringTable->insert(groupName));
}