1
General / Adding GetX and GetY to drawable
« on: August 13, 2010, 10:35:11 pm »
I haven't put this as a feature request because I don't know how important it is to anyone else.
I'd like to have GetX() and GetY() methods in drawable because it then provides symmetry with the SetX() and SetY() methods which then can translate to properties in my scripting language (does that make any sense)
If I subclass drawable to add these then that won't work for Sprite, Text, Shape as of course they inherit from Drawable not my new Drawable.
Is there a sensible way to do this without modifying the SFML source? Or is adding these methods to sf::Drawable directly the only real way to do it.
Any pointers on this would be great.
Cheers
Nick
I'd like to have GetX() and GetY() methods in drawable because it then provides symmetry with the SetX() and SetY() methods which then can translate to properties in my scripting language (does that make any sense)
If I subclass drawable to add these then that won't work for Sprite, Text, Shape as of course they inherit from Drawable not my new Drawable.
Is there a sensible way to do this without modifying the SFML source? Or is adding these methods to sf::Drawable directly the only real way to do it.
Any pointers on this would be great.
Cheers
Nick