}\r
\r
\r
-//! Writes attributes of the object.\r
-//! Implement this to expose the attributes of your scene node animator for\r
-//! scripting languages, editors, debuggers or xml serialization purposes.\r
-void GUISkin::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const\r
-{\r
- u32 i;\r
- for (i=0; i<EGDC_COUNT; ++i)\r
- out->addColor(GUISkinColorNames[i], Colors[i]);\r
-\r
- for (i=0; i<EGDS_COUNT; ++i)\r
- out->addInt(GUISkinSizeNames[i], Sizes[i]);\r
-\r
- for (i=0; i<EGDT_COUNT; ++i)\r
- out->addString(GUISkinTextNames[i], Texts[i].c_str());\r
-\r
- for (i=0; i<EGDI_COUNT; ++i)\r
- out->addInt(GUISkinIconNames[i], Icons[i]);\r
-}\r
-\r
-\r
-//! Reads attributes of the object.\r
-//! Implement this to set the attributes of your scene node animator for\r
-//! scripting languages, editors, debuggers or xml deserialization purposes.\r
-void GUISkin::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)\r
-{\r
- // TODO: This is not nice code for downward compatibility, whenever new values are added and users\r
- // load an old skin the corresponding values will be set to 0.\r
- u32 i;\r
- for (i=0; i<EGDC_COUNT; ++i)\r
- Colors[i] = in->getAttributeAsColor(GUISkinColorNames[i]);\r
-\r
- for (i=0; i<EGDS_COUNT; ++i)\r
- Sizes[i] = in->getAttributeAsInt(GUISkinSizeNames[i]);\r
-\r
- for (i=0; i<EGDT_COUNT; ++i)\r
- Texts[i] = in->getAttributeAsStringW(GUISkinTextNames[i]);\r
-\r
- for (i=0; i<EGDI_COUNT; ++i)\r
- Icons[i] = in->getAttributeAsInt(GUISkinIconNames[i]);\r
-}\r
-\r
-\r
//! gets the colors\r
// PATCH\r
void GUISkin::getColors(video::SColor* colors)\r