some changes

Started by SDH, 08 June 2014, 11:57:49


Well Hello,

I today started working with TGUI and i saw some things :D like:


can you change it to sf::Vector2 ?
because having functions with 2x floats & sf::Vector2f is confusing.

to std::string ?
because sf::String crashes on empty string :

add support for sf::Font, because peoples like me have their own resources manager :)
and i know its just one font but, still.

feel free to insult [use criticism on] me :D


There is also "setPosition(float, float)", so technically that is the default and the sf::Vector2f is just the extra one :). Even SFML still mixes these variants.
The one with the 2 floats has always been less limiting, you aren't forced to use a sf::Vector2f. But now with c++11 you could of course call the function like "setPosition({10, 10})" which makes the variant with floats unnecessary. So if I would redesign it then everything will indeed use sf::Vector2f. But this change will not be made in v0.6 because it breaks the api.
You should just compile SFML with an extra flag, and then the crash with sf::String is fixed.
sf::String supports unicode while std::string doesn't, so I won't change it to std::string anyway.

There is another setGlobalFont function that takes a sf::Font as parameter.


sorry for that setGlobalFont looks like i missed sf::Font definition,
Have a nice day.