Example #1
0
 /// <summary>
 /// Draw the cursor.
 /// </summary>
 /// <param name="shapeDrawer">Uses the shapedrawer to draw the cursor.</param>
 public static void Draw(ShapeDrawer shapeDrawer)
 {
     if (initialized && IsCursorVisible)
     {
         shapeDrawer.DrawMouseCursor(CurrentMousePosition.X, CurrentMousePosition.Y, mouseColor);
     }
 }
Example #2
0
 /// <summary>
 /// Draw the debug information.
 /// </summary>
 /// <param name="shapeDrawer">Uses the shapedrawer to draw the debug string.</param>
 public static void DrawGUI(ShapeDrawer shapeDrawer)
 {
     if (initialized && Debug)
     {
         int h = (int)shapeDrawer.Font.MeasureString("A").Y;
         shapeDrawer.DrawString(10, 10, StateManager.DrawColor, "Mouse Position: " + CurrentMousePosition.ToString());
     }
 }
Example #3
0
        /// <summary>
        /// Called at the end of the public Load overloads. Creates a ShapeDrawer object and sets public property references. Tells the StateManager to create its states.
        /// </summary>
        /// <param name="_sb">Main instance of this game's <see cref="Microsoft.Xna.Framework.Graphics.SpriteBatch"/> object.</param>
        private static void Load(SpriteBatch _sb)
        {
            // Set up the shape drawer.
            SpriteBatch = _sb;
            Pen         = new ShapeDrawer(_sb, fonts[FontIDs.Main], Main.GraphicsDevice);

            // Set up the states.
            StateManager.LoadStates(textures);
        }