1
Feature requests / Mouse Position Delta
« on: June 23, 2013, 12:24:14 pm »
It would be nice if the MouseMoveEvent struct:
were to have 2 more useful members:
Currently, I have to calculate them manually by constantly tracking MouseMoved events.
I think it would be cleaner to have SFML do it.
The implementation should be simple, but that's none of my business, so I'll leave it at that.
struct MouseMoveEvent
{
int x; ///< X position of the mouse pointer, relative to the left of the owner window
int y; ///< Y position of the mouse pointer, relative to the top of the owner window
};
{
int x; ///< X position of the mouse pointer, relative to the left of the owner window
int y; ///< Y position of the mouse pointer, relative to the top of the owner window
};
were to have 2 more useful members:
struct MouseMoveEvent
{
int x; ///< X position of the mouse pointer, relative to the left of the owner window
int y; ///< Y position of the mouse pointer, relative to the top of the owner window
int deltaX; ///< Difference in X position of the mouse pointer, relative to the left of the owner window
int deltaY; ///< Difference in Y position of the mouse pointer, relative to the top of the owner window
};
{
int x; ///< X position of the mouse pointer, relative to the left of the owner window
int y; ///< Y position of the mouse pointer, relative to the top of the owner window
int deltaX; ///< Difference in X position of the mouse pointer, relative to the left of the owner window
int deltaY; ///< Difference in Y position of the mouse pointer, relative to the top of the owner window
};
Currently, I have to calculate them manually by constantly tracking MouseMoved events.
I think it would be cleaner to have SFML do it.
The implementation should be simple, but that's none of my business, so I'll leave it at that.