struct IEntityPropertyHandler { enum EPropertyType { Bool, Int, Float, Vector, String, Entity, FolderBegin, FolderEnd }; enum EPropertyFlags { ePropertyFlag_UIEnum = BIT(0), ePropertyFlag_Unsorted = BIT(1) }; struct SPropertyInfo { const char* name; EPropertyType type; const char* editType; const char* description; uint32 flags; struct SLimits { float min; float max; } limits; }; };
IEntityClass.h
Custom interface that can be used to enumerate/set an entity class' property. Used for comunication with the editor, mostly.
enum EPropertyFlags { ePropertyFlag_UIEnum = BIT(0), ePropertyFlag_Unsorted = BIT(1) };
IEntityClass.h
enum EPropertyType { Bool, Int, Float, Vector, String, Entity, FolderBegin, FolderEnd };
IEntityClass.h
struct SPropertyInfo { const char* name; EPropertyType type; const char* editType; const char* description; uint32 flags; struct SLimits { float min; float max; } limits; };
IEntityClass.h
Members |
Description |
const char* name; |
Name of the property. |
EPropertyType type; |
Type of the property value. |
const char* editType; |
Type of edit control to use. |
const char* description; |
Description of the property. |
uint32 flags; |
Property flags. |
struct SLimits { float min; float max; };
IEntityClass.h
virtual ~IEntityPropertyHandler();
virtual const char* GetDefaultProperty(int index) const = 0;
Parameters |
Description |
int index |
Index of the property to get, must be in 0 to GetPropertyCount()-1 range. |
Get a property in a entity of this class.
virtual void GetMemoryUsage(ICrySizer * pSizer) const;
Property info for entity class.
virtual const char* GetProperty(IEntity* entity, int index) const = 0;
Parameters |
Description |
int index |
Index of the property to get, must be in 0 to GetPropertyCount()-1 range. |
Get a property in a entity of this class.
virtual int GetPropertyCount() const = 0;
Return Number of properties.
Returns number of properties for this entity.
virtual bool GetPropertyInfo(int index, SPropertyInfo& info) const = 0;
Parameters |
Description |
nIndex |
Index of the property to retrieve, must be in 0 to GetPropertyCount()-1 range. |
Specified event description in SPropertyInfo structure.
Retrieve information about properties of the entity.
virtual uint32 GetScriptFlags() const = 0;
Get script flags of this class.
virtual void InitArchetypeEntity(IEntity* entity, const char* archetypeName, const SEntitySpawnParams& spawnParams) = 0;
Init entity with archetype properties.
virtual void LoadArchetypeXMLProperties(const char* archetypeName, const XmlNodeRef& xml) = 0;
Load archetype properties.
virtual void LoadEntityXMLProperties(IEntity* entity, const XmlNodeRef& xml) = 0;
Load properties into the entity.
virtual void PropertiesChanged(IEntity* entity) = 0;
Inform the implementation that properties have changed. Called at the end of a change block.
virtual void RefreshProperties() = 0;
Refresh the class' properties.
virtual void SetProperty(IEntity* entity, int index, const char* value) = 0;
Parameters |
Description |
int index |
Index of the property to set, must be in 0 to GetPropertyCount()-1 range. |
Set a property in a entity of this class.