Example #1
0
        /// <summary>
        /// Draws a test GUI component to the screen.
        /// </summary>
        private static void DrawTestGUI()
        {
            int height = (int)Pen.StringDimensions("A").Y;

            Pen.DrawString((int)ScreenCenter.X, (int)ScreenCenter.Y - height, Color.White, "This is a left test.", ShapeDrawer.LEFT_ALIGN);

            Pen.DrawString((int)ScreenCenter.X, (int)ScreenCenter.Y, Color.White, "This is a center test.", ShapeDrawer.CENTER_ALIGN);

            Pen.DrawString((int)ScreenCenter.X, (int)ScreenCenter.Y + height, Color.White, "This is a right test.", ShapeDrawer.RIGHT_ALIGN);

            Pen.DrawString(0, 0, Color.White, "This is a default test.");
        }
Example #2
0
 /// <summary>
 /// Draw a message to the screen.
 /// </summary>
 /// <param name="x">X-coordinate.</param>
 /// <param name="y">Y-coordinate.</param>
 /// <param name="s">String to print.</param>
 /// <param name="alignment">Alignment to print the message to.</param>
 public static void DrawMessage(int x, int y, string s, int alignment, Color textColor)
 {
     // Print message.
     Pen.DrawString(x, y, textColor, s, alignment);
 }