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;
            }
        }
Beispiel #2
0
        public void SetOverflowMode(TextOverflowMode eMode)
        {
            switch (eType)
            {
            case TextType.UnityTextMesh:
                DebugUtil.Log(2, "Unity fText.SetOverflowMode not implemented!");
                break;

            case TextType.TextMeshPro:
#if G3_ENABLE_TEXT_MESH_PRO || F3_ENABLE_TEXT_MESH_PRO
                (text_component as TextMeshProExt).SetOverflowMode(eMode);
#endif
                break;
            }
        }
Beispiel #3
0
 public void SetOverflowMode(TextOverflowMode eMode)
 {
     if (this.autoSizeTextContainer == true)
     {
         throw new Exception("TextMeshProExt.SetOverflowMode: cannot set overflow mode if text container is auto-sized. Call SetFixedWidth first.");
     }
     if (eMode == TextOverflowMode.Clipped)
     {
         this.overflowMode = TextOverflowModes.Masking;
     }
     else if (eMode == TextOverflowMode.Truncate)
     {
         this.overflowMode = TextOverflowModes.Truncate;
     }
     else if (eMode == TextOverflowMode.Ellipses)
     {
         this.overflowMode = TextOverflowModes.Ellipsis;
     }
     else
     {
         this.overflowMode = TextOverflowModes.Overflow;
     }
 }
Beispiel #4
0
 public TextRenderer(TextOverflowMode overflowMode, bool wordSplitAllowed)
 {
     this.overflowMode     = overflowMode;
     this.wordSplitAllowed = wordSplitAllowed;
 }