internal static void Update() { OldKeyboard = Keyboard; OldMouse = Mouse; Keyboard = KeyHandler.GetState(); Mouse = MouseHandler.GetState(); }
/// <summary> /// Retrieves the current mouse state /// </summary> /// <returns>The current mouse state</returns> public static MouseHandler GetState() { XnaExtMouse xem = XnaExtMouse.GetState(); MouseHandler ret = new MouseHandler() { l = xem.Left, Right = xem.Right, Middle = xem.Middle, XButton1 = xem.XButton1, XButton2 = xem.XButton2 }; ret.Position = xem.Position; ret.ScrollWheel = xem.ScrollWheel; return(ret); }
/// <summary> /// Retrieves the current mouse state /// </summary> /// <returns>The current mouse state</returns> public static MouseHandler GetState() { XnaExtMouse xem = XnaExtMouse.GetState(); MouseHandler ret = new MouseHandler() { l = xem.Left, Right = xem.Right, Middle = xem.Middle, XButton1 = xem.XButton1, XButton2 = xem.XButton2 }; ret.Position = xem.Position; ret.ScrollWheel = xem.ScrollWheel; return ret; }