SFML community forums
Help => General => Topic started by: osmkzy on August 10, 2023, 09:24:08 am
-
Hello i'm an absulute beginner at sfml how can i make a text input box like in a login screen?
-
Bare minimum for an input text box would be
sf::RectangleShape or sf::Sprite (https://www.sfml-dev.org/tutorials/2.6/graphics-draw.php) to display the box
sf::Text & sf::Font (https://www.sfml-dev.org/tutorials/2.6/graphics-text.php) to display the the text
The TextEntered event (https://www.sfml-dev.org/tutorials/2.6/window-events.php) to catch the text inputted by the user
and of course the mandatory basics of how to create a windows, a correct event and main loop
Could also use a GUI library like TGUI or SFGUI, but I don't know anything about them