Hello
I'm having a beginner problem, I've already searched Google, Youtube, and the SFML documentation.
All I want to do, is catching what the user types and output (cout) that to the console window (I'll do it to the GUI later on).
Code:void msgBoxTxt() {
gui gui; //Class where the function is in
sf::Event msgBoxEvent = sf::Event();
cout << "Text: ";
while (true) {
if (msgBoxEvent.type == sf::Event::TextEntered) {
cout << static_cast<char>(msgBoxEvent.text.unicode) <<endl;
}
}
}
The function is triggered correctly because "Text: " is displaying.
What am I doing wrong here?
Thanks for helping!