mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 22:53:47 +00:00
Adds ability to get InspectorGroup index, as well as inserting a new inspectorGroup at a specific position in the list
This commit is contained in:
parent
56233410cf
commit
5b4af68793
2 changed files with 38 additions and 0 deletions
|
|
@ -232,6 +232,27 @@ GuiInspectorGroup* GuiInspector::findExistentGroup( StringTableEntry groupName )
|
|||
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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue