InternalSetMousePosition() protected méthode

Internal function to set the mouse position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.
protected InternalSetMousePosition ( Vector2i position ) : void
position Vector2i Relative mouse position
Résultat void
Exemple #1
0
 /// <summary>
 /// Sets the current position of the mouse.
 /// </summary>
 /// This function sets the current position of the mouse
 /// cursor relative to a window.
 /// <param name="position">New position of the mouse</param>
 /// <param name="relativeTo">Reference window</param>
 public static void SetPosition(Vector2i position, Window relativeTo = null)
 {
     if (relativeTo != null)
     {
         relativeTo.InternalSetMousePosition(position);
     }
     else
     {
         sfMouse_setPosition(position, IntPtr.Zero);
     }
 }
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Set the current position of the mouse
 /// </summary>
 /// This function sets the current position of the mouse
 /// cursor relative to a window.
 /// <param name="position">New position of the mouse</param>
 /// <param name="relativeTo">Reference window</param>
 ////////////////////////////////////////////////////////////
 public static void SetPosition(Vector2i position, Window relativeTo)
 {
     if (relativeTo != null)
         relativeTo.InternalSetMousePosition(position);
     else
         sfMouse_setPosition(position, IntPtr.Zero);
 }