Added support for <duration>float</duration> to the slideshow3D .xml format
to allow the time for autostepping between layers/slides. Moved the tiles accross to the left hands side by default.
This commit is contained in:
@@ -189,6 +189,12 @@ void ReaderWriterSS3D::parseLayer(SlideShowConstructor& constructor, xmlDocPtr d
|
||||
{
|
||||
parseModel(constructor, doc,cur);
|
||||
}
|
||||
else if ((!xmlStrcmp(cur->name, (const xmlChar *)"duration")))
|
||||
{
|
||||
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
|
||||
if (key) constructor.setLayerDuration(atof((const char*)key));
|
||||
xmlFree(key);
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
@@ -221,6 +227,12 @@ void ReaderWriterSS3D::parseSlide (SlideShowConstructor& constructor, xmlDocPtr
|
||||
{
|
||||
parseLayer (constructor, doc, cur);
|
||||
}
|
||||
else if ((!xmlStrcmp(cur->name, (const xmlChar *)"duration")))
|
||||
{
|
||||
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
|
||||
if (key) constructor.setSlideDuration(atof((const char*)key));
|
||||
xmlFree(key);
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
return;
|
||||
@@ -290,6 +302,12 @@ osgDB::ReaderWriter::ReadResult ReaderWriterSS3D::readNode(const std::string& fi
|
||||
if (key) constructor.setTextColor(mapStringToColor((const char*)key));
|
||||
xmlFree(key);
|
||||
}
|
||||
else if ((!xmlStrcmp(cur->name, (const xmlChar *)"duration")))
|
||||
{
|
||||
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
|
||||
if (key) constructor.setPresentationDuration(atof((const char*)key));
|
||||
xmlFree(key);
|
||||
}
|
||||
else if ((!xmlStrcmp(cur->name, (const xmlChar *)"slide")))
|
||||
{
|
||||
parseSlide (constructor, doc, cur);
|
||||
|
||||
Reference in New Issue
Block a user