示例#1
0
 public TMProData(TextMeshProUGUI text)
 {
     this.fontData.font        = text.font;
     this.fontData.material    = text.fontSharedMaterial;
     this.fontStyle            = text.fontStyle;
     this.fontSize             = text.fontSize;
     this.autoSize             = text.enableAutoSizing;
     this.autoSizeOptions.min  = text.fontSizeMin;
     this.autoSizeOptions.max  = text.fontSizeMax;
     this.autoSizeOptions.wd   = text.characterWidthAdjustment;
     this.autoSizeOptions.line = text.lineSpacingAdjustment;
     this.color                = text.color;
     this.overrideTags         = text.overrideColorTags;
     this.spacings.character   = text.characterSpacing;
     this.spacings.word        = text.wordSpacing;
     this.spacings.line        = text.lineSpacing;
     this.spacings.paragraph   = text.paragraphSpacing;
     this.alignment            = text.alignment;
     this.wrapping             = text.enableWordWrapping;
     this.overflow             = text.overflowMode;
     this.horizontalMapping    = text.horizontalMapping;
     this.verticalMapping      = text.verticalMapping;
     this.margins.marginsV4    = text.margin;
     this.geometrySorting      = text.geometrySortingOrder;
     this.richText             = text.richText;
     this.raycastTarget        = text.raycastTarget;
     this.parseEscapeCharaters = text.parseCtrlCharacters;
     this.visibleDescender     = text.useMaxVisibleDescender;
     this.spriteAsset          = text.spriteAsset;
     this.kerning              = text.enableKerning;
     this.extraPadding         = text.extraPadding;
 }
        public void SortGeometry(VertexSortingOrder order)
        {
            switch (order)
            {
            case VertexSortingOrder.Normal:
                // Do nothing
                break;

            case VertexSortingOrder.Reverse:
                int size = vertexCount / 4;
                for (int i = 0; i < size; i++)
                {
                    int src = i * 4;
                    int dst = (size - i - 1) * 4;

                    if (src < dst)
                    {
                        SwapVertexData(src, dst);
                    }
                }
                break;
                //case VertexSortingOrder.Depth:
                //    break;
            }
        }
        public void Copy(TextGenerationSettings other)
        {
            bool flag = other == null;

            if (!flag)
            {
                this.text                   = other.text;
                this.screenRect             = other.screenRect;
                this.margins                = other.margins;
                this.scale                  = other.scale;
                this.fontAsset              = other.fontAsset;
                this.material               = other.material;
                this.spriteAsset            = other.spriteAsset;
                this.fontStyle              = other.fontStyle;
                this.textAlignment          = other.textAlignment;
                this.overflowMode           = other.overflowMode;
                this.wordWrap               = other.wordWrap;
                this.wordWrappingRatio      = other.wordWrappingRatio;
                this.color                  = other.color;
                this.fontColorGradient      = other.fontColorGradient;
                this.tintSprites            = other.tintSprites;
                this.overrideRichTextColors = other.overrideRichTextColors;
                this.fontSize               = other.fontSize;
                this.autoSize               = other.autoSize;
                this.fontSizeMin            = other.fontSizeMin;
                this.fontSizeMax            = other.fontSizeMax;
                this.enableKerning          = other.enableKerning;
                this.richText               = other.richText;
                this.isRightToLeft          = other.isRightToLeft;
                this.extraPadding           = other.extraPadding;
                this.parseControlCharacters = other.parseControlCharacters;
                this.characterSpacing       = other.characterSpacing;
                this.wordSpacing            = other.wordSpacing;
                this.lineSpacing            = other.lineSpacing;
                this.paragraphSpacing       = other.paragraphSpacing;
                this.lineSpacingMax         = other.lineSpacingMax;
                this.maxVisibleCharacters   = other.maxVisibleCharacters;
                this.maxVisibleWords        = other.maxVisibleWords;
                this.maxVisibleLines        = other.maxVisibleLines;
                this.firstVisibleCharacter  = other.firstVisibleCharacter;
                this.useMaxVisibleDescender = other.useMaxVisibleDescender;
                this.fontWeight             = other.fontWeight;
                this.pageToDisplay          = other.pageToDisplay;
                this.horizontalMapping      = other.horizontalMapping;
                this.verticalMapping        = other.verticalMapping;
                this.uvLineOffset           = other.uvLineOffset;
                this.geometrySortingOrder   = other.geometrySortingOrder;
                this.inverseYAxis           = other.inverseYAxis;
                this.charWidthMaxAdj        = other.charWidthMaxAdj;
            }
        }
示例#4
0
        public void SortGeometry(VertexSortingOrder order)
        {
            switch (order)
            {
            case VertexSortingOrder.Normal:
                // Do nothing
                break;

            case VertexSortingOrder.Reverse:
                //
                break;

            case VertexSortingOrder.Depth:
                break;
            }
        }
示例#5
0
        public void SortGeometry(VertexSortingOrder order)
        {
            if (order == VertexSortingOrder.Normal || order != VertexSortingOrder.Reverse)
            {
                return;
            }
            int num = vertexCount / 4;

            for (int i = 0; i < num; i++)
            {
                int num2 = i * 4;
                int num3 = (num - i - 1) * 4;
                if (num2 < num3)
                {
                    SwapVertexData(num2, num3);
                }
            }
        }
 internal void SortGeometry(VertexSortingOrder order)
 {
     if (order != VertexSortingOrder.Normal)
     {
         if (order == VertexSortingOrder.Reverse)
         {
             int num = this.vertexCount / 4;
             for (int i = 0; i < num; i++)
             {
                 int  num2 = i * 4;
                 int  num3 = (num - i - 1) * 4;
                 bool flag = num2 < num3;
                 if (flag)
                 {
                     this.SwapVertexData(num2, num3);
                 }
             }
         }
     }
 }