Exemplo n.º 1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(NameName, Name);
            node.Add(NormalName, Normal.ExportYAML(container));
            node.Add(HoverName, Hover.ExportYAML(container));
            node.Add(ActiveName, Active.ExportYAML(container));
            node.Add(FocusedName, Focused.ExportYAML(container));
            node.Add(OnNormalName, OnNormal.ExportYAML(container));
            node.Add(OnHoverName, OnHover.ExportYAML(container));
            node.Add(OnActiveName, OnActive.ExportYAML(container));
            node.Add(OnFocusedName, OnFocused.ExportYAML(container));
            node.Add(BorderName, Border.ExportYAML(container));
            node.Add(MarginName, Margin.ExportYAML(container));
            node.Add(PaddingName, Padding.ExportYAML(container));
            node.Add(OverflowName, Overflow.ExportYAML(container));
            node.Add(FontName, Font.ExportYAML(container));
            node.Add(FontSizeName, FontSize);
            node.Add(FontStyleName, (int)FontStyle);
            node.Add(AlignmentName, (int)Alignment);
            node.Add(WordWrapName, WordWrap);
            node.Add(RichTextName, RichText);
            node.Add(TextClippingName, (int)TextClipping);
            node.Add(ImagePositionName, (int)ImagePosition);
            node.Add(ContentOffsetName, ContentOffset.ExportYAML(container));
            node.Add(FixedWidthName, FixedWidth);
            node.Add(FixedHeightName, FixedHeight);
            node.Add(StretchWidthName, StretchWidth);
            node.Add(StretchHeightName, StretchHeight);
            return(node);
        }
Exemplo n.º 2
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("m_Name", Name);
            node.Add("m_Normal", Normal.ExportYAML(container));
            node.Add("m_Hover", Hover.ExportYAML(container));
            node.Add("m_Active", Active.ExportYAML(container));
            node.Add("m_Focused", Focused.ExportYAML(container));
            node.Add("m_OnNormal", OnNormal.ExportYAML(container));
            node.Add("m_OnHover", OnHover.ExportYAML(container));
            node.Add("m_OnActive", OnActive.ExportYAML(container));
            node.Add("m_OnFocused", OnFocused.ExportYAML(container));
            node.Add("m_Border", Border.ExportYAML(container));
            node.Add("m_Margin", Margin.ExportYAML(container));
            node.Add("m_Padding", Padding.ExportYAML(container));
            node.Add("m_Overflow", Overflow.ExportYAML(container));
            node.Add("m_Font", Font.ExportYAML(container));
            node.Add("m_FontSize", FontSize);
            node.Add("m_FontStyle", (int)FontStyle);
            node.Add("m_Alignment", (int)Alignment);
            node.Add("m_WordWrap", WordWrap);
            node.Add("m_RichText", RichText);
            node.Add("m_TextClipping", (int)TextClipping);
            node.Add("m_ImagePosition", (int)ImagePosition);
            node.Add("m_ContentOffset", ContentOffset.ExportYAML(container));
            node.Add("m_FixedWidth", FixedWidth);
            node.Add("m_FixedHeight", FixedHeight);
            node.Add("m_StretchWidth", StretchWidth);
            node.Add("m_StretchHeight", StretchHeight);
            return(node);
        }
Exemplo n.º 3
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(BorderName, Border.ExportYAML(container));
            node.Add(PivotName, Pivot.ExportYAML(container));
            node.Add(OldSizeName, OldSize.ExportYAML(container));
            node.Add(NewSizeName, NewSize.ExportYAML(container));
            node.Add(AdaptiveTilingThresholdName, AdaptiveTilingThreshold);
            node.Add(DrawModeName, DrawMode);
            node.Add(AdaptiveTilingName, AdaptiveTiling);
            return(node);
        }
Exemplo n.º 4
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("border", Border.ExportYAML(container));
            node.Add("pivot", Pivot.ExportYAML(container));
            node.Add("oldSize", OldSize.ExportYAML(container));
            node.Add("newSize", NewSize.ExportYAML(container));
            node.Add("adaptiveTilingThreshold", AdaptiveTilingThreshold);
            node.Add("drawMode", DrawMode);
            node.Add("adaptiveTiling", AdaptiveTiling);
            return(node);
        }
Exemplo n.º 5
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("name", Name);
            node.Add("rect", Rect.ExportYAML(container));
            node.Add("alignment", (int)Alignment);
            node.Add("pivot", Pivot.ExportYAML(container));
            node.Add("border", Border.ExportYAML(container));
            node.Add("outline", Outline.ExportYAML(container));
            node.Add("physicsShape", PhysicsShape.ExportYAML(container));
            node.Add("tessellationDetail", TessellationDetail);
            return(node);
        }
Exemplo n.º 6
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(NameName, Name);
            node.Add(RectName, Rect.ExportYAML(container));
            node.Add(AlignmentName, (int)Alignment);
            node.Add(PivotName, Pivot.ExportYAML(container));
            if (HasBorder(container.ExportVersion))
            {
                node.Add(BorderName, Border.ExportYAML(container));
            }
            if (HasOutline(container.ExportVersion))
            {
                node.Add(OutlineName, Outline.ExportYAML(container));
            }
            if (HasPhysicsShape(container.ExportVersion))
            {
                node.Add(PhysicsShapeName, PhysicsShape.ExportYAML(container));
            }
            if (HasTessellationDetail(container.ExportVersion))
            {
                node.Add(TessellationDetailName, TessellationDetail);
            }
            if (HasBones(container.ExportVersion))
            {
                node.Add(BonesName, Bones.ExportYAML(container));
                node.Add(SpriteIDName, SpriteID);
            }
            if (HasInternalID(container.ExportVersion))
            {
                node.Add(InternalIDName, InternalID);
            }
            if (HasBones(container.ExportVersion))
            {
                node.Add(VerticesName, Vertices.ExportYAML(container));
                node.Add(IndicesName, Indices.ExportYAML(true));
                node.Add(EdgesName, Edges.ExportYAML(container));
                node.Add(WeightsName, Weights.ExportYAML(container));
            }
            return(node);
        }
Exemplo n.º 7
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node   = new YAMLMappingNode();
            GUIStyleLayout  layout = container.ExportLayout.Serialized.GUIStyle;

            node.Add(layout.NameName, Name);
            node.Add(layout.NormalName, Normal.ExportYAML(container));
            node.Add(layout.HoverName, Hover.ExportYAML(container));
            node.Add(layout.ActiveName, Active.ExportYAML(container));
            node.Add(layout.FocusedName, Focused.ExportYAML(container));
            node.Add(layout.OnNormalName, OnNormal.ExportYAML(container));
            node.Add(layout.OnHoverName, OnHover.ExportYAML(container));
            node.Add(layout.OnActiveName, OnActive.ExportYAML(container));
            node.Add(layout.OnFocusedName, OnFocused.ExportYAML(container));
            node.Add(layout.BorderName, Border.ExportYAML(container));
            if (layout.IsBuiltinFormat)
            {
                node.Add(layout.MarginName, Margin.ExportYAML(container));
                node.Add(layout.PaddingName, Padding.ExportYAML(container));
            }
            else
            {
                node.Add(layout.PaddingName, Padding.ExportYAML(container));
                node.Add(layout.MarginName, Margin.ExportYAML(container));
            }

            node.Add(layout.OverflowName, Overflow.ExportYAML(container));
            node.Add(layout.FontName, Font.ExportYAML(container));
            if (layout.IsBuiltinFormat)
            {
                node.Add(layout.FontSizeName, FontSize);
                node.Add(layout.FontStyleName, (int)FontStyle);
                node.Add(layout.AlignmentName, (int)Alignment);
                node.Add(layout.WordWrapName, WordWrap);
                node.Add(layout.RichTextName, RichText);
                node.Add(layout.TextClippingName, (int)TextClipping);
                node.Add(layout.ImagePositionName, (int)ImagePosition);
                node.Add(layout.ContentOffsetName, ContentOffset.ExportYAML(container));
                node.Add(layout.FixedWidthName, FixedWidth);
                node.Add(layout.FixedHeightName, FixedHeight);
                node.Add(layout.StretchWidthName, StretchWidth);
                node.Add(layout.StretchHeightName, StretchHeight);
            }
            else
            {
                node.Add(layout.ImagePositionName, (int)ImagePosition);
                node.Add(layout.AlignmentName, (int)Alignment);
                node.Add(layout.WordWrapName, WordWrap);
                node.Add(layout.TextClippingName, (int)TextClipping);
                node.Add(layout.ContentOffsetName, ContentOffset.ExportYAML(container));
                node.Add(layout.ClipOffsetName, ClipOffset.ExportYAML(container));
                node.Add(layout.FixedWidthName, FixedWidth);
                node.Add(layout.FixedHeightName, FixedHeight);
                if (layout.HasFontSize)
                {
                    node.Add(layout.FontSizeName, FontSize);
                    node.Add(layout.FontStyleName, (int)FontStyle);
                }
                node.Add(layout.StretchWidthName, StretchWidth);
                node.Add(layout.StretchHeightName, StretchHeight);
            }
            return(node);
        }