mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-23 00:23:46 +00:00
Added D3D error code interpreter
Added sanity check for findMatch Finished most of asset importer logic to utilize settings system Cleaned up code for finding associated files Added General importer settings category and integrated logic for those settings fields Updated logic in variableGroup to support callbacks in custom fields Updated logic in variableInspector to better handle callbacks, as well as being able to manually update when manipulating fields Updated scripts to utilize project settings values for playGUI and mainMenuGUI names Improved module-oriented loading of materials Added util function for populating custom fonts
This commit is contained in:
parent
02262b014a
commit
ab9fc302fc
19 changed files with 620 additions and 598 deletions
|
|
@ -117,7 +117,7 @@ bool GuiInspectorVariableGroup::inspectGroup()
|
|||
|
||||
Con::executef(this, "onConstructField", mFields[i]->mFieldName,
|
||||
mFields[i]->mFieldLabel, mFields[i]->mFieldTypeName, mFields[i]->mFieldDescription,
|
||||
mFields[i]->mDefaultValue, mFields[i]->mDataValues, mFields[i]->mOwnerObject);
|
||||
mFields[i]->mDefaultValue, mFields[i]->mDataValues, mFields[i]->mSetCallbackName, mFields[i]->mOwnerObject);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "gui/editor/inspector/variableInspector.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
GuiVariableInspector::GuiVariableInspector()
|
||||
GuiVariableInspector::GuiVariableInspector() : mAutoUpdate(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ void GuiVariableInspector::endGroup()
|
|||
}
|
||||
|
||||
void GuiVariableInspector::addField(const char* name, const char* label, const char* typeName, const char* description,
|
||||
const char* defaultValue, const char* dataValues, SimObject* ownerObj)
|
||||
const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj)
|
||||
{
|
||||
VariableField newField;
|
||||
newField.mFieldName = StringTable->insert(name);
|
||||
|
|
@ -127,7 +127,7 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c
|
|||
newField.mDefaultValue = StringTable->insert(defaultValue);
|
||||
newField.mDataValues = String(dataValues);
|
||||
newField.mGroup = mCurrentGroup;
|
||||
newField.mSetCallbackName = StringTable->EmptyString();
|
||||
newField.mSetCallbackName = StringTable->insert(callbackName);
|
||||
newField.mEnabled = true;
|
||||
|
||||
newField.mOwnerObject = ownerObj;
|
||||
|
|
@ -184,18 +184,14 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c
|
|||
|
||||
mFields.push_back(newField);
|
||||
|
||||
update();
|
||||
if(mAutoUpdate)
|
||||
update();
|
||||
}
|
||||
|
||||
void GuiVariableInspector::addCallbackField(const char* name, const char* label, const char* typeName, const char* description,
|
||||
const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj)
|
||||
{
|
||||
addField(name, label, typeName, description, defaultValue, dataValues, ownerObj);
|
||||
|
||||
//Add the callback name
|
||||
mFields.last().mSetCallbackName = StringTable->insert(callbackName);
|
||||
|
||||
update();
|
||||
addField(name, label, typeName, description, defaultValue, dataValues, callbackName, ownerObj);
|
||||
}
|
||||
|
||||
void GuiVariableInspector::clearFields()
|
||||
|
|
@ -238,7 +234,7 @@ DefineEngineMethod(GuiVariableInspector, addField, void, (const char* name, cons
|
|||
if (name == "" || typeName == "")
|
||||
return;
|
||||
|
||||
object->addField(name, label, typeName, description, defaultValue, dataValues, ownerObj);
|
||||
object->addField(name, label, typeName, description, defaultValue, dataValues, "", ownerObj);
|
||||
}
|
||||
|
||||
DefineEngineMethod(GuiVariableInspector, addCallbackField, void, (const char* name, const char* label, const char* typeName,
|
||||
|
|
@ -270,3 +266,8 @@ DefineEngineMethod( GuiVariableInspector, loadVars, void, ( const char * searchS
|
|||
{
|
||||
object->loadVars( searchString );
|
||||
}
|
||||
|
||||
DefineEngineMethod(GuiVariableInspector, setAutoUpdate, void, (bool doAutoUpdate), (true), "setAutoUpdate( doAutoUpdate ) - Dictates if the inspector automatically updates when changes happen, or if it must be called manually")
|
||||
{
|
||||
object->setAutoUpdate(doAutoUpdate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,18 +53,22 @@ public:
|
|||
void endGroup();
|
||||
|
||||
void addField(const char* name, const char* label, const char* typeName, const char* description,
|
||||
const char* defaultValue, const char* dataValues, SimObject* ownerObj);
|
||||
const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj);
|
||||
void addCallbackField(const char* name, const char* label, const char* typeName, const char* description,
|
||||
const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj);
|
||||
void setFieldEnabled(const char* name, bool enabled);
|
||||
void clearFields();
|
||||
|
||||
void setAutoUpdate(bool doAutoUpdate) { mAutoUpdate = doAutoUpdate; }
|
||||
|
||||
protected:
|
||||
|
||||
Vector<VariableField> mFields;
|
||||
|
||||
String mCurrentGroup;
|
||||
|
||||
bool mAutoUpdate;
|
||||
|
||||
};
|
||||
|
||||
#endif // _GUI_VARIABLEINSPECTOR_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue