hello everyone, i am trying to understand why the same code in Linux works fine, while on mac not.
the problem seams to be with mouse wheel delta.
if (event.type == sf::Event::MouseWheelMoved) { //zoom
zoomView(event.mouseWheel.delta);
std::cout << event.mouseWheel.delta << '\n';
}
and
void Game::zoomView(int zoom) {
renderWindow.clear();
if (zoom == 1)
view.zoom(0.9);
else
view.zoom(1.05);
renderWindow.clear();
renderWindow.setView(view);
}
i added that cout to check the output, and it doesn't matter if i use a mouse or the pad of my macbook, if i scroll up or down it will always print 0 causing a zoom out.
well sometimes, if i scroll a lot harder, it prints different numbers and the zooming seams not to know if to scroll in or out, but the final effect is always to scroll down.
i need a solution to make it work in any situation.
i can't make it zoom in and/orout using keys.
thanks for your helping.