Hello. I'm trying to make Fallout 3 terminal application (
). I can't figure out how to make text shown character by character. Found some code that works in regular C++ console app:
std::string str = "some text";
for (unsigned i = 0; i < str.length(); i++)
{
cout << str[i];
if ((i + 1) < str.length() && str[i + 1] != '\n')
cout << char(219);
_sleep(6);
if ((i + 1) < str.length() && str[i + 1] != '\n')
cout << char(8);
}
cout << ' ' << char(8);
And there goes my questions:
1. How can I use in SFML's Text class something like:
sf::Text str = "some text";
window.draw(str[i]);
?
2. How can I parse
char to
sf::Text, and then draw it, like in cout's example above?
3. Didn't test, but is the
_sleep(n) command is proper for SFML program loop?
PS. Please note I'm novice in C++ and with English language