From 70d898103700c1dec042129a7fa7f8f431774fb2 Mon Sep 17 00:00:00 2001 From: parax0 Date: Tue, 5 Jan 2016 01:41:22 -0700 Subject: [PATCH] Added support for property descriptions --- src/Core/Resource/Script/IPropertyTemplate.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Core/Resource/Script/IPropertyTemplate.h b/src/Core/Resource/Script/IPropertyTemplate.h index 93130926..0410a1ad 100644 --- a/src/Core/Resource/Script/IPropertyTemplate.h +++ b/src/Core/Resource/Script/IPropertyTemplate.h @@ -32,6 +32,7 @@ class IPropertyTemplate protected: CStructTemplate *mpParent; TString mName; + TString mDescription; u32 mID; ECookPreference mCookPreference; std::vector mAllowedVersions; @@ -72,6 +73,9 @@ public: else mCookPreference = eNoCookPreference; } + + else if (rkParamName == "description") + mDescription = rkValue; } virtual IProperty* InstantiateProperty() = 0; @@ -81,6 +85,11 @@ public: return mName; } + inline TString Description() const + { + return mDescription; + } + inline u32 PropertyID() const { return mID; @@ -91,9 +100,14 @@ public: return mCookPreference; } - inline void SetName(const TString& Name) + inline void SetName(const TString& rkName) { - mName = Name; + mName = rkName; + } + + inline void SetDescription(const TString& rkDesc) + { + mDescription = rkDesc; } inline CStructTemplate* Parent() const