/// <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); } }
/// <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()); } }
/// <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); }