Integration of Entities into the inspector/editor so they can call back into the tool scripts for custom handling.

This commit is contained in:
Areloch 2016-05-14 14:12:53 -05:00
parent 38c18870d3
commit 827e70d674
8 changed files with 960 additions and 5 deletions

View file

@ -28,7 +28,8 @@
#include "gui/editor/inspector/dynamicGroup.h"
#include "gui/containers/guiScrollCtrl.h"
#include "gui/editor/inspector/customField.h"
#include "gui/editor/inspector/entityGroup.h"
#include "gui/editor/inspector/mountingGroup.h"
IMPLEMENT_CONOBJECT(GuiInspector);
@ -584,6 +585,27 @@ void GuiInspector::refresh()
mGroups.push_back(general);
addObject(general);
//Behavior inspector group
if (mTargets.first()->getClassRep()->isSubclassOf("Entity"))
{
GuiInspectorEntityGroup *components = new GuiInspectorEntityGroup("Components", this);
if (components != NULL)
{
components->registerObject();
mGroups.push_back(components);
addObject(components);
}
//Mounting group override
GuiInspectorGroup *mounting = new GuiInspectorMountingGroup("Mounting", this);
if (mounting != NULL)
{
mounting->registerObject();
mGroups.push_back(mounting);
addObject(mounting);
}
}
// Create the inspector groups for static fields.
for( TargetVector::iterator iter = mTargets.begin(); iter != mTargets.end(); ++ iter )