I'll have to look into that. Perhaps in the meantime you can use code like this and check if that works:
Unfortunately my windows drive got corrupted a few days ago so it will take a few hours/days before I have everything up and running again to test that code and find out why it doesn't compile.
EDIT: Are you using the latest update of VS2015? You need at least update 2 to have full support for the connect function.
Code (cpp) Select
void function(sf::RenderWindow& window, const sf::String& item)
{
if (item == "Exit")
mWindow.close();
}
mMenuBar->connect("MenuItemClicked", function, std::ref(mWindow));Unfortunately my windows drive got corrupted a few days ago so it will take a few hours/days before I have everything up and running again to test that code and find out why it doesn't compile.
EDIT: Are you using the latest update of VS2015? You need at least update 2 to have full support for the connect function.