Introducing the event manager

Figuring out what we want from our application is the first and the most crucial part of the design process. Sometimes it's difficult to cover all your bases, but forgetting about a feature that might alter the way all the code is structured and trying to implement it later can wreak some serious havoc on all the work you put into your software. Having said that, let's make a list of what features we want our event manager to have:

  • The ability to couple any mix of keys, buttons, or events (from now on referred to as bindings) with desired functionality identified by a string
  • Binding of the said functionalities to methods that get called if all the conditions (such as a key being pressed, the left mouse button being ...

Get SFML Game Development By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.