mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 07:45:40 +00:00
Expands/Cleans up a lot of the asset functionality, including management, file association, and creation/importing
This commit is contained in:
parent
ba2e9f1547
commit
ddfc416418
73 changed files with 4468 additions and 1876 deletions
|
|
@ -48,8 +48,8 @@ class GameObjectAsset : public AssetBase
|
|||
typedef AssetBase Parent;
|
||||
|
||||
StringTableEntry mGameObjectName;
|
||||
StringTableEntry mScriptFilePath;
|
||||
StringTableEntry mTAMLFilePath;
|
||||
StringTableEntry mScriptFile;
|
||||
StringTableEntry mTAMLFile;
|
||||
|
||||
public:
|
||||
GameObjectAsset();
|
||||
|
|
@ -59,12 +59,24 @@ public:
|
|||
static void initPersistFields();
|
||||
virtual void copyTo(SimObject* object);
|
||||
|
||||
const char* create();
|
||||
|
||||
/// Declare Console Object.
|
||||
DECLARE_CONOBJECT(GameObjectAsset);
|
||||
|
||||
void setScriptFile(const char* pScriptFile);
|
||||
inline StringTableEntry getScriptFile(void) const { return mScriptFile; };
|
||||
void setTAMLFile(const char* pScriptFile);
|
||||
inline StringTableEntry getTAMLFile(void) const { return mTAMLFile; };
|
||||
|
||||
protected:
|
||||
virtual void initializeAsset(void);
|
||||
virtual void onAssetRefresh(void);
|
||||
|
||||
static bool setScriptFile(void *obj, const char *index, const char *data) { static_cast<GameObjectAsset*>(obj)->setScriptFile(data); return false; }
|
||||
static const char* getScriptFile(void* obj, const char* data) { return static_cast<GameObjectAsset*>(obj)->getScriptFile(); }
|
||||
static bool setTAMLFile(void *obj, const char *index, const char *data) { static_cast<GameObjectAsset*>(obj)->setTAMLFile(data); return false; }
|
||||
static const char* getTAMLFile(void* obj, const char* data) { return static_cast<GameObjectAsset*>(obj)->getTAMLFile(); }
|
||||
};
|
||||
|
||||
DefineConsoleType(TypeGameObjectAssetPtr, GameObjectAsset)
|
||||
|
|
@ -73,12 +85,12 @@ DefineConsoleType(TypeGameObjectAssetPtr, GameObjectAsset)
|
|||
//-----------------------------------------------------------------------------
|
||||
// TypeAssetId GuiInspectorField Class
|
||||
//-----------------------------------------------------------------------------
|
||||
class GuiInspectorTypeGameObjectAssetPtr : public GuiInspectorTypeFileName
|
||||
class GuiInspectorTypeGameObjectAssetPtr : public GuiInspectorField
|
||||
{
|
||||
typedef GuiInspectorTypeFileName Parent;
|
||||
typedef GuiInspectorField Parent;
|
||||
public:
|
||||
|
||||
GuiBitmapButtonCtrl *mSMEdButton;
|
||||
GuiButtonCtrl *mGameObjectEditButton;
|
||||
|
||||
DECLARE_CONOBJECT(GuiInspectorTypeGameObjectAssetPtr);
|
||||
static void consoleInit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue