VIEW_CONTROLS::GetMousePosition() returns VECTOR2I.

This commit is contained in:
Maciej Suminski 2015-07-24 09:42:45 +02:00
parent 49d8b90e0b
commit cd205db812
3 changed files with 5 additions and 5 deletions

View File

@ -327,12 +327,12 @@ void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled )
} }
VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const VECTOR2I WX_VIEW_CONTROLS::GetMousePosition() const
{ {
wxPoint msp = wxGetMousePosition(); wxPoint msp = wxGetMousePosition();
wxPoint winp = m_parentPanel->GetScreenPosition(); wxPoint winp = m_parentPanel->GetScreenPosition();
return VECTOR2D( msp.x - winp.x, msp.y - winp.y ); return VECTOR2I( msp.x - winp.x, msp.y - winp.y );
} }

View File

@ -113,9 +113,9 @@ public:
* Returns the current mouse pointer position in screen coordinates. Note, that it may be * Returns the current mouse pointer position in screen coordinates. Note, that it may be
* different from the cursor position if snapping is enabled (@see GetCursorPosition()). * different from the cursor position if snapping is enabled (@see GetCursorPosition()).
* *
* @return The current mouse pointer position in screen coordinates. * @return The current mouse pointer position in the screen coordinates.
*/ */
virtual VECTOR2D GetMousePosition() const = 0; virtual VECTOR2I GetMousePosition() const = 0;
/** /**
* Function GetCursorPosition() * Function GetCursorPosition()

View File

@ -86,7 +86,7 @@ public:
} }
/// @copydoc VIEW_CONTROLS::GetMousePosition() /// @copydoc VIEW_CONTROLS::GetMousePosition()
VECTOR2D GetMousePosition() const; VECTOR2I GetMousePosition() const;
/// @copydoc VIEW_CONTROLS::GetCursorPosition() /// @copydoc VIEW_CONTROLS::GetCursorPosition()
VECTOR2D GetCursorPosition() const; VECTOR2D GetCursorPosition() const;