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); }
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); }
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); }