This is probably a newbie-ish issue, so I'm sorry for any wasted time this causes.
Anyways, I'm trying to limit the zoom of a view to never scale the view out farther than it's original size ( or zoomLevel zero as I've dubbed it).
I currently have tried setting up a counter to increment on positive delta, and decrement on negative, with negative only affecting the zoom while the counter is above 0. No matter what way I write that, the zoom will never zoom out in the slightest with (zoomLevel > 0) requirement in place.
Thank you for your assistance.
unsigned int zoomLevel = 0;
while (App.GetEvent(Event))
{
if ((Event.Type == sf::Event::MouseWheelMoved) && (Event.MouseWheel.Delta > 0))
{
background.Zoom(1.1f);
zoomLevel++;
}
else if((Event.Type == sf::Event::MouseWheelMoved) && (Event.MouseWheel.Delta < 0) && (zoomLevel > 0))
{
background.Zoom(.9f);
zoomLevel--;
};
};