Hey Guys!
I wander through the window tutorial for SFML and already came across pollEvents(Event event) and therefore I found out that there is DispatchEvents() for us C# users.
sadly I just can't find a way to do this tutorial with the DispatchEvents() example. I already tried to figure it out but couldn't find a way. Even tho searching here for this issue I only found other code chunks which weren't helpful enough for me (cause I'm a slow mind).
there my wish is - can anybody morphe the following tutorial code to the working solution with C# (and the DispatchEvents()) ?
int main()
{
sf::Window window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
}
return 0;
}