mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #249 from Areloch/InspectorGroupInserts
Adds additional functions for inserting inspectorGroups
This commit is contained in:
commit
dda0cc9aa7
2 changed files with 38 additions and 0 deletions
|
|
@ -232,6 +232,27 @@ GuiInspectorGroup* GuiInspector::findExistentGroup( StringTableEntry groupName )
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
S32 GuiInspector::findExistentGroupIndex(StringTableEntry groupName)
|
||||||
|
{
|
||||||
|
// If we have no groups, it couldn't possibly exist
|
||||||
|
if (mGroups.empty())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// Attempt to find it in the group list
|
||||||
|
Vector<GuiInspectorGroup*>::iterator i = mGroups.begin();
|
||||||
|
|
||||||
|
S32 index = 0;
|
||||||
|
for (; i != mGroups.end(); i++)
|
||||||
|
{
|
||||||
|
if (dStricmp((*i)->getGroupName(), groupName) == 0)
|
||||||
|
return index;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void GuiInspector::updateFieldValue( StringTableEntry fieldName, StringTableEntry arrayIdx )
|
void GuiInspector::updateFieldValue( StringTableEntry fieldName, StringTableEntry arrayIdx )
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,16 @@ public:
|
||||||
mGroups.push_back(group);
|
mGroups.push_back(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a group into group list at a specific position
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="insertIndex"></param>
|
||||||
|
/// <param name="group"></param>
|
||||||
|
void insertInspectorGroup(U32 insertIndex, GuiInspectorGroup* group)
|
||||||
|
{
|
||||||
|
mGroups.insert(insertIndex, group);
|
||||||
|
}
|
||||||
|
|
||||||
/// Deletes all GuiInspectorGroups
|
/// Deletes all GuiInspectorGroups
|
||||||
void clearGroups();
|
void clearGroups();
|
||||||
|
|
||||||
|
|
@ -118,6 +128,13 @@ public:
|
||||||
/// Helper for inspectObject
|
/// Helper for inspectObject
|
||||||
GuiInspectorGroup* findExistentGroup( StringTableEntry groupName );
|
GuiInspectorGroup* findExistentGroup( StringTableEntry groupName );
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks through the group list by name to find it's index
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupName"></param>
|
||||||
|
/// <returns>Returns the index position of the group in the group list as S32. -1 if groupName not found.</returns>
|
||||||
|
S32 findExistentGroupIndex(StringTableEntry groupName);
|
||||||
|
|
||||||
/// Should there be a GuiInspectorField associated with this fieldName,
|
/// Should there be a GuiInspectorField associated with this fieldName,
|
||||||
/// update it to reflect actual/current value of that field in the inspected object.
|
/// update it to reflect actual/current value of that field in the inspected object.
|
||||||
/// Added to support UndoActions
|
/// Added to support UndoActions
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue