Ejemplo n.º 1
0
        public override void PostDraw()
        {
#if DEBUG
            const int LineSize = 15;
            const int x        = 8;
            int       y        = 30;

            if (items.Count == 0)
            {
                return;
            }

            Screen2DText.Action_BeginText(true);

            foreach (var line in items.Values)
            {
                float invSqItemAge = 1 - Easing.EaseIn(line.Age, EasingType.Quadratic);
                if (MathHelper.AlmostEqual(invSqItemAge, 0))
                {
                    continue;
                }

                var itemColor = line.New ? NewItemColor : new TV_COLOR(1, 1, 1, invSqItemAge);

                var displayText = string.Format("{0} {1} {2}", line.Name, line.Value.Equals(string.Empty) ? string.Empty : ":", line.Value);

                if (Shadows)
                {
                    var shadowColor = new TV_COLOR(0, 0, 0, invSqItemAge * 0.5f);
                    Screen2DText.TextureFont_DrawText(displayText, x - 1, y - 1, shadowColor.GetIntColor());
                }
                Screen2DText.TextureFont_DrawText(displayText, x, y, itemColor.GetIntColor());
                y += LineSize;
            }

            Screen2DText.Action_EndText();

            Clean();
#endif
        }