Exemple #1
0
        protected TextParser.Config CreateConfig()
        {
            TextParser.Config config = new TextParser.Config();
            config.anchor    = Anchor.Null;
            config.font      = font;
            config.fontStyle = fontStyle;
            config.fontSize  = fontSize;
            config.fontColor = color;

            config.isBlink     = false;
            config.isStrickout = false;
            config.isUnderline = false;
            config.dyncSpeed   = Tools.s_dyn_default_speed;

            config.lineAlignment = lineAlignment;

            BaseMeshEffect effect = GetComponent <BaseMeshEffect>();

            if (effect != null)
            {
                if (effect is Outline)
                {
                    Outline outline = effect as Outline;
                    config.effectType     = EffectType.Outline;
                    config.effectColor    = outline.effectColor;
                    config.effectDistance = outline.effectDistance;
                }
                else if (effect is Shadow)
                {
                    Shadow shadow = effect as Shadow;
                    config.effectType     = EffectType.Shadow;
                    config.effectColor    = shadow.effectColor;
                    config.effectDistance = shadow.effectDistance;
                }
                else
                {
                    config.effectType = EffectType.Null;
                }
            }
            else
            {
                config.effectType = EffectType.Null;
            }

            return(config);
        }
Exemple #2
0
        public override void SetConfig(TextParser.Config c)
        {
            base.SetConfig(c);

            d_font          = c.font;
            d_bUnderline    = c.isUnderline;
            d_fontSize      = c.fontSize;
            d_fontStyle     = c.fontStyle;
            d_bStrickout    = c.isStrickout;
            d_bDynUnderline = c.isDyncUnderline;
            d_bDynStrickout = c.isDyncStrickout;
            d_dynSpeed      = c.dyncSpeed;

            effectType     = c.effectType;
            effectColor    = c.effectColor;
            effectDistance = c.effectDistance;
        }
Exemple #3
0
        public virtual void SetConfig(TextParser.Config c)
        {
            d_nextLineX   = c.nextLineX;
            d_bBlink      = c.isBlink;
            lineAlignment = c.lineAlignment;

            d_color   = c.fontColor;
            d_bOffset = c.isOffset;
            if (c.isOffset)
            {
                d_rectOffset = c.offsetRect;
            }
            else
            {
                d_rectOffset.Set(0, 0, 0, 0);
            }
        }