Hi guys,
I've been using TGUI and SFML since few months on a little game quizz I developped.
There's an issue I am not able to solve regarding the "pressed" event.
When the game starts, a first window appears where the user needs to input its username and click OK. Then the quizz starts. However, when I run the code, if the user clicks OK, nothing happens. I figured out that the user has to click AND to move the mouse so that the event is correctly triggered.
Here is the code responsible for creating the OK button and the associated connect function:
// Create the "Ok" button
tgui::Button::Ptr button = theme->load("Button");
button->setSize(windowWidth / 2, windowHeight / 6);
button->setPosition(windowWidth / 4, windowHeight * 7 / 10);
button->setText("Ok");
gui.add(button);
// Call the login function when the button is pressed
button->connect("pressed", login, editBoxUsername);
Any help on this one?