Example #1
0
        public TextToken2D(string text, Color fillColor, bool updateCanevas = true)
            : base(null)
        {
            this.fullText = text;

            this.textCursor = -1;

            this.text2D = new Text();

            //if(text.StartsWith("{") && text.EndsWith("}") && int.TryParse(text.Substring(1, text.Length - 2), out int parameterIndex))
            //{
            //    this.ParameterIndex = parameterIndex;
            //}
            //else
            //{
            //    this.ParameterIndex = -1;
            //}

            this.TextCursor  = this.FullText.Count();
            this.text2D.Font = AObject2DFactory.GetFontByName("Sans");

            this.text2D.FillColor        = fillColor;
            this.text2D.OutlineThickness = 2;
            this.text2D.OutlineColor     = new Color(0, 0, 0, fillColor.A);

            if (updateCanevas)
            {
                this.UpdateCanevas();
            }
        }
Example #2
0
        public TitleTextToken2D(string text, Color fillColor)
            : base(text, fillColor, false)
        {
            this.text2D.Font = AObject2DFactory.GetFontByName("dumbTitle");

            this.text2D.FillColor        = fillColor;
            this.text2D.OutlineThickness = 0;
            this.text2D.OutlineColor     = Color.Black;

            this.UpdateCanevas();
        }