diff -r 38aad3ba4440 lib/irrlicht/include/IGUIElement.h --- a/lib/irrlicht/include/IGUIElement.h Tue Aug 26 23:50:27 2008 +0200 +++ b/lib/irrlicht/include/IGUIElement.h Tue Aug 26 23:58:39 2008 +0200 @@ -787,12 +787,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); @@ -816,6 +822,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")); @@ -889,6 +896,9 @@ //! id s32 ID; + + //! name to identify element + core::stringc Name; //! tab stop like in windows bool IsTabStop;