Hi all, I've made my program functional without the need to use Event. However, as I've noticed the c# version of SFML doesn't have pollEvent. It does however have DispatchEvent, but it takes no arguments, so I'm unsure as to know it will know which event variable to check.
I'm trying to get my level editor to show more on resize - instead of stretching it. The tutorial at
http://www.sfml-dev.org/tutorials/2.0/graphics-view.php poses a solution, however I'm not totally sure how I can get this to work in c# (no pollEvents, and when I check my event.Type - it always returns 'Closed'.)
Could you please point me in the right direction?
This is the code I'm referring to:
// the event loop
sf::Event event;
while (window.pollEvent(event))
{
...
// catch the resize events
if (event.type == sf::Event::Resized)
{
// update the view to the new size of the window
sf::FloatRect visibleArea(0, 0, event.size.width, event.size.height);
window.setView(sf::View(visibleArea));
}
}