It took me a while to figure it out but I think I know what is going wrong (the compile error isn't very helpful).
You are not passing enough parameters to the connect function. Since the function is a class member, there is a hidden "this" parameter that has to be provided. Check the "
connecting member functions" part of the signal tutorial.
Your code should have been like this:
ConnectionScreen screen;
button->connect("pressed", &ConnectionScreen::login, &screen, "test", "test");
The correct form for the one with the getText calls would be the following (manual std::bind is required as there have to be 2 bind calls of which tgui only performs one).
button->connect("pressed", &ConnectionScreen::login, &screen, std::bind(&tgui::EditBox::getText, editBoxUsername), std::bind(&tgui::EditBox::getText, editBoxPassword));
But the original code should have worked if you would have pass the hidden "this" pointer to the connect function as well. There isn't anything that I can do it TGUI to make it easier, it is a c++ detail that you have to know when passing function pointers.