mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Updates the VariableInspector, VariableGroup and VariableField objects to actually be useful. In addition to the original functionality of being able to have a var name passed in and search for all vars with that in it, it also lets you build out a completely custom Inspector.
Unlike the regular Inspector, which requires a specific object or objects, from which the fields are pulled from, this lets you manually create fields, which can tie into any given object and their fields, global vars, and also not only supports the engine types for fields, but also triggers a callback to script if a field type is not found allowing fully custom fields to be handled as needed.
This commit is contained in:
parent
6db2f2f5bf
commit
629a25185d
11 changed files with 593 additions and 50 deletions
|
|
@ -82,7 +82,13 @@ public:
|
|||
virtual void clearInspectObjects();
|
||||
|
||||
/// Get the currently inspected object
|
||||
SimObject* getInspectObject( U32 index = 0 ) { return mTargets[ index ]; }
|
||||
SimObject* getInspectObject(U32 index = 0)
|
||||
{
|
||||
if (!mTargets.empty())
|
||||
return mTargets[index];
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/// Return the number of objects being inspected by this GuiInspector.
|
||||
U32 getNumInspectObjects() const { return mTargets.size(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue