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
파일: Mouse.cs 프로젝트: Yozer/NanoWar
 ////////////////////////////////////////////////////////////
 /// <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));
 }