Example #1
0
        /// <summary>
        /// Print a custom overlay message
        /// </summary>
        /// <param name="message"></param>
        /// <param name="position"></param>
        /// <param name="color"></param>
        /// <param name="font"></param>
        public void Print(string message, Vector2 position, Color4 color, SpriteFont font)
        {
            var msg = new DebugOverlayMessage {
                Message = message, Position = position, TextColor = color, TextFont = font
            };

            overlayMessages.Enqueue(msg);
        }
 /// <summary>
 /// Print a custom overlay message
 /// </summary>
 /// <param name="message"></param>
 /// <param name="position"></param>
 /// <param name="color"></param>
 /// <param name="font"></param>
 public void Print(string message, Vector2 position, Color4 color, SpriteFont font)
 {
     var msg = new DebugOverlayMessage { Message = message, Position = position, TextColor = color, TextFont = font };
     overlayMessages.Enqueue(msg);
     //drop one old message if the tail size has been reached
     if (overlayMessages.Count > TailSize)
     {
         overlayMessages.Dequeue();
     }
 }
Example #3
0
        /// <summary>
        /// Print a custom overlay message
        /// </summary>
        /// <param name="message"></param>
        /// <param name="position"></param>
        /// <param name="color"></param>
        public void Print(string message, Int2 position, Color4 color)
        {
            var msg = new DebugOverlayMessage {
                Message = message, Position = position, TextColor = color
            };

            overlayMessages.Enqueue(msg);
            //drop one old message if the tail size has been reached
            if (overlayMessages.Count > TailSize)
            {
                overlayMessages.Dequeue();
            }
        }