mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-08-26 18:46:41 -04:00
31 lines
877 B
C++
31 lines
877 B
C++
/*
|
|
* GDevelop Core
|
|
* Copyright 2008-2015 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
|
|
* This project is released under the MIT License.
|
|
*/
|
|
|
|
#include "GDCore/TinyXml/tinyxml.h"
|
|
#include "GDCore/Project/ExternalLayout.h"
|
|
#include "GDCore/Project/InitialInstancesContainer.h"
|
|
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvasOptions.h"
|
|
#include "GDCore/Serialization/SerializerElement.h"
|
|
|
|
namespace gd
|
|
{
|
|
|
|
void ExternalLayout::UnserializeFrom(const SerializerElement & element)
|
|
{
|
|
name = element.GetStringAttribute("name", "", "Name");
|
|
instances.UnserializeFrom(element.GetChild("instances", 0, "Instances"));
|
|
}
|
|
|
|
#if defined(GD_IDE_ONLY)
|
|
void ExternalLayout::SerializeTo(SerializerElement & element) const
|
|
{
|
|
element.SetAttribute("name", name);
|
|
instances.SerializeTo(element.AddChild("instances"));
|
|
}
|
|
#endif
|
|
|
|
}
|