Hello guys,
my problem is that the mousebuttonreleased event does not work for me. Here is the code for my event loop
void Framework::events()
{
while (mWindow->pollEvent(*mEvent))
{
switch (mEvent->type)
{
case sf::Event::MouseButtonReleased:
{
std::cout << "Test";
} break;
default:
break;
}
}
}
When i start my program test gets spammed when i move the mouse but the funny thing is that when i release my left or right mouse button nothing happens. What am I doing wrong?
The events function is in my game loop here is the code for it
void Framework::run()
{
while (mWindow->isOpen())
{
events();
update();
render();
}
}