(Note, this is a TGUI / C++ question, not sure if this is where I should post it.)
I'm trying to do this :
void GUIManager::CreateButton(std::string m_identifier, std::string m_buttonText, std::string m_fontPath, void* func, float m_xPos, float m_yPos, float m_width, float m_height)
{
tgui::Button::Ptr m__temp_btn = std::make_shared<tgui::Button>();
m__temp_btn->setFont(m_fontPath);
m__temp_btn->setText(m_buttonText);
m__temp_btn->setPosition(m_xPos, m_yPos);
m__temp_btn->setSize(m_width, m_height);
_buttonList.insert(std::make_pair(m_identifier, m__temp_btn));
_buttonList[m_identifier]->connect("pressed", func); // It's because of this func parameter I get the error,
_gui.add(_buttonList[m_identifier]);
}
Which TGUi doesn't want me to since it gives me this error :
Error C2893 Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...)'
What am I doing wrong? :/
(I think this should be enough code to reproduce the error)