So i have this code:
case sf::Event::TextEntered:
c = static_cast<char>(event.text.unicode);
break;
My question is, how do I make this ignore keys that are not letters?
edit: bad englando
For anyone interested this is the solution:
if (((event.text.unicode > 64) && (event.text.unicode < 91)) || ((event.text.unicode > 96) && (event.text.unicode < 123)))
Instead of these magic numbers, you should use expressive standard functions in the <cctype> header (http://en.cppreference.com/w/cpp/header/cctype):
if (std::isalnum(event.text.unicode))