Removed Window::GetCursorPosition/SetCursorPosition, added Mouse::GetPosition/SetPosition (two versions: one that handles desktop coordinates, one that handles window coordinates)

This commit is contained in:
Laurent Gomila 2011-07-08 07:56:14 +02:00 committed by Marco Antognini
parent e95323e2ea
commit 6fd80e2598
19 changed files with 287 additions and 199 deletions

View file

@ -90,8 +90,8 @@ int main()
glClear(GL_DEPTH_BUFFER_BIT);
// We get the position of the mouse cursor, so that we can move the box accordingly
float x = window.GetCursorPosition().x * 200.f / window.GetWidth() - 100.f;
float y = -window.GetCursorPosition().y * 200.f / window.GetHeight() + 100.f;
float x = sf::Mouse::GetPosition(window).x * 200.f / window.GetWidth() - 100.f;
float y = -sf::Mouse::GetPosition(window).y * 200.f / window.GetHeight() + 100.f;
// Apply some transformations
glMatrixMode(GL_MODELVIEW);