Esempio n. 1
0
 public void Draw(Renderer2D renderer, int scrollOffset = 0)
 {
     renderer.DrawWithClip(rectangle, () =>
     {
         for (int i = 0; i < commands.Count; i++)
         {
             if (DropShadow)
             {
                 renderer.DrawStringBaseline(
                     commands[i].Font,
                     commands[i].FontSize,
                     commands[i].String,
                     commands[i].X + rectangle.X + 2,
                     commands[i].Y + rectangle.Y - scrollOffset + 2,
                     rectangle.X,
                     Color4.Black,
                     commands[i].Underline
                     );
             }
             renderer.DrawStringBaseline(
                 commands[i].Font,
                 commands[i].FontSize,
                 commands[i].String,
                 commands[i].X + rectangle.X,
                 commands[i].Y + rectangle.Y - scrollOffset,
                 rectangle.X,
                 commands[i].Color,
                 commands[i].Underline
                 );
         }
     });
 }