mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
Adds logic to be able to set a search string on an inspector that will be used to filter displayed fields.
Adds a textEdit filter box to the main world inspector that hooks into the primary inspector for said search functionality
This commit is contained in:
parent
59fc6d3d65
commit
d890c530f9
6 changed files with 74 additions and 8 deletions
|
|
@ -175,6 +175,9 @@ GuiControl* GuiInspectorDatablockField::constructEditControl()
|
|||
|
||||
//Add add button
|
||||
mAddButton = new GuiBitmapButtonCtrl();
|
||||
if(mDesiredClass == NULL)
|
||||
return retCtrl;
|
||||
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "DatablockEditorPlugin.createNewDatablockOfType(%s, %d.getText());", mDesiredClass->getClassName(), retCtrl->getId());
|
||||
mAddButton->setField("Command", szBuffer);
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,12 @@ bool GuiInspectorDynamicGroup::inspectGroup()
|
|||
SimFieldDictionary * fieldDictionary = target->getFieldDictionary();
|
||||
for(SimFieldDictionaryIterator ditr(fieldDictionary); *ditr; ++ditr)
|
||||
{
|
||||
String searchText = mParent->getSearchText();
|
||||
if (searchText != String::EmptyString) {
|
||||
if (String((*ditr)->slotName).find(searchText, 0, String::NoCase | String::Left) == String::NPos)
|
||||
continue;
|
||||
}
|
||||
|
||||
if( i == 0 )
|
||||
{
|
||||
flist.increment();
|
||||
|
|
|
|||
|
|
@ -288,6 +288,12 @@ bool GuiInspectorGroup::inspectGroup()
|
|||
if (field->flag.test(AbstractClassRep::FIELD_HideInInspectors))
|
||||
continue;
|
||||
|
||||
String searchText = mParent->getSearchText();
|
||||
if (searchText != String::EmptyString) {
|
||||
if (String(field->pFieldname).find(searchText, 0, String::NoCase | String::Left) == String::NPos)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((bGrabItems == true || (bNoGroup == true && bGrabItems == false)) && itr->type != AbstractClassRep::DeprecatedFieldType)
|
||||
{
|
||||
if (bNoGroup == true && bGrabItems == true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue