diff -r 49c04de3b948 lib/irrlicht/include/IGUIElement.h --- a/lib/irrlicht/include/IGUIElement.h Wed Jun 03 07:41:24 2009 +0200 +++ b/lib/irrlicht/include/IGUIElement.h Wed Jun 03 07:45:58 2009 +0200 @@ -807,12 +807,18 @@ return GUIElementTypeNames[Type]; } + //! Access the element name + core::stringc & getName() + { + return Name; + } //! 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->addInt("Id", ID ); out->addString("Caption", getText()); out->addRect("Rect", DesiredRect); @@ -836,6 +842,7 @@ scripting languages, editors, debuggers or xml deserialization purposes. */ virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) { + Name = in->getAttributeAsString("IdName"); setID(in->getAttributeAsInt("Id")); setText(in->getAttributeAsStringW("Caption").c_str()); setVisible(in->getAttributeAsBool("Visible")); @@ -911,6 +918,9 @@ //! id s32 ID; + //! name to identify element + core::stringc Name; + //! tab stop like in windows bool IsTabStop;