Hello,
When I used connect in int main(), it worked fine, but after moving it to the class it doesn't work anymore.
The code won't compile and these error messages show up:
error C3867: 'PixelPaint::onExitClicked': non-standard syntax; use '&' to create a pointer to member
error C2672: 'tgui::SignalWidgetBase::connect': no matching overloaded function found
Code:
When I used connect in int main(), it worked fine, but after moving it to the class it doesn't work anymore.
The code won't compile and these error messages show up:
error C3867: 'PixelPaint::onExitClicked': non-standard syntax; use '&' to create a pointer to member
error C2672: 'tgui::SignalWidgetBase::connect': no matching overloaded function found
Code:
Code Select
menu->connect("MenuItemClicked", onExitClicked, std::ref(window));
Code Select
void onExitClicked(sf::RenderWindow& window, const std::string& item)
{
if (item == "Wyjscie") {
window.close();
}
}