Hi everyone,
Loving the library, but a few functions I'd like to see. It would also be good to be able to move an sf::IntRect to a position without doing two Offsets in a row:
void sf::IntRect MoveAbsolute(int x, int y)
{
Offset(rect.Left,rectTop);
Offset(newX,newY);
}
Yes, I have obsessive compulsive disorder. I also don't know how to use Templates:
void moveRect(sf::FloatRect& rect, float x, float y)
{
rect.Right += x - rect.Left;
rect.Bottom += y - rect.Top;
rect.Left = x;
rect.Top = y;
}
void centreRect(sf::FloatRect& rect, float x, float y)
{
moveRect(rect,x-rect.GetWidth()/2,y-rect.GetHeight()/2);
}
The second function is one that I use constantly, but it's probably a bit to specific for a library that's supposed to be very simple. Also the main reason I use it is because I didn't realise that SFML supported views, so I wrote my own :?
That's all I can think of for now, but unless I write this stuff down I'll forget about it and/or kludge my way around it.
Tanks,
William