SFML community forums

Help => General => Topic started by: osmkzy on August 10, 2023, 09:24:08 am

Title: Question
Post 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?
Title: Re: Question
Post by: G. on August 10, 2023, 09:46:48 am
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