SFML community forums

General => Feature requests => Topic started by: sirGustav on January 05, 2008, 03:53:08 pm

Title: changing cursor position and relative motion
Post by: sirGustav on January 05, 2008, 03:53:08 pm
Looking at the documentation I cant's seem to find anything related to relative mouseinput or changing the position of the cursor.

This is (especially) useful for first person styled movement like:
Code: [Select]
sf::Event Event;
App.GetMouseState( Event );
// use Event.Mouse for moving camera
App.MoveCursorTo(width/2, height/2);
Title: changing cursor position and relative motion
Post by: Laurent on January 05, 2008, 04:32:03 pm
Mouse coordinates :
Code: [Select]
float X = App.GetInput().GetMouseX();
float Y = App.GetInput().GetMouseY();


Cursor position (in next release) :
Code: [Select]
App.SetCursorPosition(X, Y);
Title: changing cursor position and relative motion
Post by: sirGustav on January 05, 2008, 05:34:06 pm
thanks, propbably should have looked better at the roadmap :)
*goes away to get the rc*

edit: after a few minor tweaks(to my code) the rc works like a charm, now I'm having trouble of finding anything wrong with this library - I really like the cleanness of the design. Thanks for a wonderful library and a great support :)
Title: changing cursor position and relative motion
Post by: Laurent on January 06, 2008, 05:08:14 am
Quote
now I'm having trouble of finding anything wrong with this library

Damn, I should really add new bugs to the next release :D

Quote
I really like the cleanness of the design. Thanks for a wonderful library and a great support

Thank you ;)
Title: changing cursor position and relative motion
Post by: Hugo on July 11, 2010, 07:17:52 am
Quote:
now I'm having trouble of finding anything wrong with this library  

Quote:
I really like the cleanness of the design. Thanks for a wonderful library and a great support

*in British accent*
Too right mate