WaveEngine.Components.Toolkit.TextComponent.RefreshLines C# (CSharp) Method

RefreshLines() private method

Updates the text lines
private RefreshLines ( ) : void
return void
        private void RefreshLines()
        {
            this.charInfoList.Clear();

            if (this.spriteFont == null)
            {
                return;
            }

            Vector2 aux = Vector2.Zero;
            var linesInfo = this.LinesInfo;

            for (int i = 0; i < linesInfo.Count; i++)
            {
                aux.X = this.LinesInfo[i].AlignmentOffsetX;

                for (int j = 0; j < this.LinesInfo[i].SubTextList.Count; j++)
                {
                    var subText = linesInfo[i].SubTextList[0];
                    this.AddLine(
                        subText.Text,
                        aux,
                        subText.Color);

                    aux.X += linesInfo[i].SubTextList[j].Size.X;
                }

                aux.Y -= this.FontHeight + (this.lineSpacing / this.TextScale.Y);
            }
        }