コード例 #1
0
        public void Write(AssetWriter writer)
        {
            writer.Write(Name);
            Normal.Write(writer);
            Hover.Write(writer);
            Active.Write(writer);
            Focused.Write(writer);
            OnNormal.Write(writer);
            OnHover.Write(writer);
            OnActive.Write(writer);
            OnFocused.Write(writer);
            Border.Write(writer);
            if (IsBuiltin(writer.Version))
            {
                Margin.Write(writer);
                Padding.Write(writer);
            }
            else
            {
                Padding.Write(writer);
                Margin.Write(writer);
            }
            Overflow.Write(writer);
            Font.Write(writer);

            if (IsBuiltin(writer.Version))
            {
                writer.Write(FontSize);
                writer.Write((int)FontStyle);
                writer.Write((int)Alignment);
                writer.Write(WordWrap);
                writer.Write(RichText);
                writer.AlignStream();

                writer.Write((int)TextClipping);
                writer.Write((int)ImagePosition);
                ContentOffset.Write(writer);
                writer.Write(FixedWidth);
                writer.Write(FixedHeight);
                writer.Write(StretchWidth);
                writer.Write(StretchHeight);
                writer.AlignStream();
            }
            else
            {
                writer.Write((int)ImagePosition);
                writer.Write((int)Alignment);
                writer.Write(WordWrap);
                writer.AlignStream();

                writer.Write((int)TextClipping);
                ContentOffset.Write(writer);
                ClipOffset.Write(writer);
                writer.Write(FixedWidth);
                writer.Write(FixedHeight);
                if (HasFontSize(writer.Version))
                {
                    writer.Write(FontSize);
                    writer.Write((int)FontStyle);
                }
                writer.Write(StretchWidth);
                writer.AlignStream();
                writer.Write(StretchHeight);
                writer.AlignStream();
            }
        }