| 63 | } |
| 64 | |
| 65 | void 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 | |
| 110 | void GuiVariableInspector::startGroup(const char* name) |
| 111 | { |
no test coverage detected