diff -r bb48e5480c74 lib/irrlicht/include/IGUIElement.h --- a/lib/irrlicht/include/IGUIElement.h Wed Sep 23 00:04:45 2009 +0200 +++ b/lib/irrlicht/include/IGUIElement.h Wed Sep 23 00:10:47 2009 +0200 @@ -813,12 +813,25 @@ public: return Name; } + //! textid which can be used for stringtables + virtual void setTextID(const wchar_t* text) + { + TextID = text; + } + + //! Returns textid which can be used for stringtables + virtual const wchar_t* getTextID() const + { + return TextID.c_str(); + } + //! Writes attributes of the scene node. /** Implement this to expose the attributes of your scene node for scripting languages, editors, debuggers or xml serialization purposes. */ virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const { out->addString("IdName", Name.c_str() ); // call it IdName instead of name, because otherwise it's hard to find in the xml as name is used so often + out->addString("TextID", getTextID()); out->addInt("Id", ID ); out->addString("Caption", getText()); out->addRect("Rect", DesiredRect); @@ -843,6 +856,7 @@ public: virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) { Name = in->getAttributeAsString("IdName"); + setTextID(in->getAttributeAsStringW("TextID").c_str()); setID(in->getAttributeAsInt("Id")); setText(in->getAttributeAsStringW("Caption").c_str()); setVisible(in->getAttributeAsBool("Visible")); @@ -921,6 +935,9 @@ protected: //! name to identify element core::stringc Name; + //! text id which can be used for stringtables + core::stringw TextID; + //! tab stop like in windows bool IsTabStop;