Thanks for the review and the feedback! It's nice to hear my work is appreciated
I must have missed that there was a separate discussion for that. I left a post with my code there. Of course that belongs in a separate commit! I'll remove it, leave a comment in the doc and wait until something proper has been added.
Since
sf::IntRect is needed for the
sf::Screen class, I thought it would be the best to move
Rect.hpp into the System class. It seemed to be most fitting since
sf::Vector is already there. But of course I will rework it into a separate commit using
git mv, so the history isn't lost.
I know
#warning isn't a standard preprocessor directive, but all the available compilers support it and I didn't know any other way to issue a compile time warning.
I know a constructor with that many arguments is ugly and not expressive, but I didn't really know how else to do it. Do you have a suggestion? I can make it private again, but the way I understood Laurent it's OK if the user can construct and manipulate a
sf::Screen instance as they wish as long as the ones returned by SFML are immutable.
What do you suggest for a consistent naming? The
sf::Shape classes have
getPointCount(),
sf::SoundBuffer has
getSampleCount(), etc. but I think that was chosen because it's not clear what
sf::Shape::count() or
sf::SoundBuffer::count() is supposed return. For
sf::Screen::count() it's quiet clear I'd say. But of course I am open for a name that fits better into the consisting API. Also returning
std::size_t would be a more consistent right?
I haven't written all of the documentation yet, because I didn't want to rewrite everything while the API is still changing. The idea behind the ID is that you can find the screen belonging to a videomode (to get the screen from mode and to verify the screen supports the mode). The ID's are continuous in range [0 .. count()[. The primary screen is always at index
[0] and the rest is sorted from left to right in virtual screen space. I will add some documentation about that. What do others think is index the better name for this?
About
const std::wstring ... That used to be a reference, so the const made sense back then. I'll remove it. Of course
std::wstring doesn't make sense in the public API, since there is
sf::String for that. It's also a unfinished left over and I'll change that as well.