0 Members and 1 Guest are viewing this topic.
there was no declaration, SFML has you get a key like this
and I looked and didn't find it in the documentation
Are all the keys different types?
sf::Key::Code Controls[4];
What type is a sf::Key::Down?
No, there are multiple possibilites to find out the type quickly. If you have a modern IDE like Visual Studio, you can jump to the definition of the type and look at the auto-completion list. Or search in the SFML documentation, maybe you'll find it even faster with Google. Or output the typeid name on console.
template <typename T>void showMeTheTypeOf(const T&){ // The always-true condition makes picky compilers like GCC happy. // Without it, they report the error too early. char forceError[sizeof(T) == 0 ? 1 : -1];}