Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Event System  (Read 2819 times)

0 Members and 1 Guest are viewing this topic.

sajuuk

  • Newbie
  • *
  • Posts: 5
    • View Profile
Event System
« on: July 30, 2011, 12:49:09 pm »
I was wondering, is it possible to manually pool the events as in c++?

The reason I'm asking this is because I'm working on the screen system explained there :

https://github.com/SFML/SFML/wiki/TutorialScreens

In the c++ version, we manually poll the events so a screen will stop responding to events when it doesn't have the focus.

But in c# we are using handler added to the sharded RenderWindow so a screen will continue to respond to events when it doesn't have the focus.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Event System
« Reply #1 on: July 30, 2011, 01:59:21 pm »
No, it's not possible. But you have other solutions: you can unregister a screen's callbacks when it becomes inactive, or you check if the screen is active in its callbacks.
Laurent Gomila - SFML developer

sajuuk

  • Newbie
  • *
  • Posts: 5
    • View Profile
Event System
« Reply #2 on: July 30, 2011, 03:57:00 pm »
That's what I'm doing.

Thanks for help.

 

anything