diff -r abfd23c8a38d lib/irrlicht/include/IGUIElement.h --- a/lib/irrlicht/include/IGUIElement.h Wed Aug 27 00:12:58 2008 +0200 +++ b/lib/irrlicht/include/IGUIElement.h Wed Aug 27 00:19:24 2008 +0200 @@ -792,6 +792,18 @@ { 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 @@ -799,6 +811,7 @@ 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); @@ -823,6 +836,7 @@ 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")); @@ -899,6 +913,9 @@ //! 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;