Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - JerryBohenek

#1
Oh, that's right,

Thanks a lot and stay safe!  :D
#2
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:

menu->connect("MenuItemClicked", onExitClicked, std::ref(window));

void onExitClicked(sf::RenderWindow& window, const std::string& item)
{
if (item == "Wyjscie") {
window.close();
}
}