InternalGetMousePosition() защищенный Метод

Internal function to get 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 InternalGetMousePosition ( ) : Vector2i
Результат Vector2i
Пример #1
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Get the current position of the mouse
 /// </summary>
 /// This function returns the current position of the mouse
 /// cursor relative to a window.
 /// <param name="relativeTo">Reference window</param>
 /// <returns>Current position of the mouse</returns>
 ////////////////////////////////////////////////////////////
 public static Vector2i GetPosition(Window relativeTo)
 {
     if (relativeTo != null)
         return relativeTo.InternalGetMousePosition();
     else
         return sfMouse_getPosition(IntPtr.Zero);
 }
Пример #2
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Get the current position of the mouse
 /// </summary>
 /// This function returns the current position of the mouse
 /// cursor relative to a window.
 /// <param name="relativeTo">Reference window</param>
 /// <returns>Current position of the mouse</returns>
 ////////////////////////////////////////////////////////////
 public static Vector2i GetPosition(Window relativeTo)
 {
     if (relativeTo != null)
     {
         return(relativeTo.InternalGetMousePosition());
     }
     else
     {
         return(sfMouse_getPosition(IntPtr.Zero));
     }
 }
Пример #3
0
 /// <summary>
 /// Gets the current position of the mouse.
 /// </summary>
 /// This function returns the current position of the mouse
 /// cursor relative to a window.
 /// <param name="relativeTo">Reference window.</param>
 /// <returns>Current position of the mouse.</returns>
 public static Vector2i GetPosition(Window relativeTo = null)
 {
     return(relativeTo?.InternalGetMousePosition() ?? sfMouse_getPosition(IntPtr.Zero));
 }