Browse Source

Corrects the clearFields function of the variableInspector and enables the callback field support.

Areloch 7 years ago
parent
commit
b9adeb0f28

+ 1 - 0
Engine/source/gui/editor/inspector/variableField.h

@@ -57,6 +57,7 @@ public:
 
 protected:
    StringTableEntry mVariableName;
+   StringTableEntry mSetCallbackName;
    SimObject* mOwnerObject;
 };
 

+ 3 - 0
Engine/source/gui/editor/inspector/variableGroup.cpp

@@ -151,6 +151,9 @@ bool GuiInspectorVariableGroup::inspectGroup()
       fieldGui->setInspectorField(NULL, mFields[i]->mFieldLabel);
       fieldGui->setDocs(mFields[i]->mFieldDescription);
 
+      if(mFields[i]->mSetCallbackName != StringTable->EmptyString())
+         fieldGui->setSpecialEditCallbackName(mFields[i]->mSetCallbackName);
+
       /*if (mFields[i]->mSetCallbackName != StringTable->EmptyString())
       {
          fieldGui->on.notify()

+ 3 - 1
Engine/source/gui/editor/inspector/variableInspector.cpp

@@ -195,8 +195,10 @@ void GuiVariableInspector::addCallbackField(const char* name, const char* label,
 
 void GuiVariableInspector::clearFields()
 {
+   mGroups.clear();
    mFields.clear();
-   clearGroups();
+   clear();
+   
    update();
 }