MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / update

Method update

Engine/source/gui/editor/inspector/variableInspector.cpp:65–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void GuiVariableInspector::update()
66{
67 for (U32 g = 0; g < mGroups.size(); g++)
68 {
69 mGroups[g]->clearFields();
70 }
71
72 for (U32 i = 0; i < mFields.size(); i++)
73 {
74 //first, get the var's group name. if the group exists, we'll add to it's list
75 GuiInspectorVariableGroup *group = nullptr;
76
77 for (U32 g = 0; g < mGroups.size(); g++)
78 {
79 if (mGroups[g]->getCaption().equal(mFields[i]->mGroup))
80 {
81 group = static_cast<GuiInspectorVariableGroup*>(mGroups[g]);
82 break;
83 }
84 }
85
86 if (group == nullptr)
87 {
88 group = new GuiInspectorVariableGroup();
89
90 group->setHeaderHidden(false);
91 group->setCanCollapse(true);
92 group->mParent = this;
93 group->setCaption(mFields[i]->mGroup);
94
95 group->registerObject();
96 mGroups.push_back(group);
97 addObject(group);
98 }
99
100 group->addField(mFields[i]);
101 }
102
103 //And now, cue our update for the groups themselves
104 for (U32 g = 0; g < mGroups.size(); g++)
105 {
106 mGroups[g]->inspectGroup();
107 }
108}
109
110void GuiVariableInspector::startGroup(const char* name)
111{

Callers 1

DefineEngineMethodFunction · 0.45

Calls 9

sizeMethod · 0.45
clearFieldsMethod · 0.45
equalMethod · 0.45
getCaptionMethod · 0.45
setCaptionMethod · 0.45
registerObjectMethod · 0.45
push_backMethod · 0.45
addFieldMethod · 0.45
inspectGroupMethod · 0.45

Tested by

no test coverage detected