Building the event manager
At this time, we have everything we need to actually write the header of our event manager class. Given all the design decisions we made previously, it should come out looking something like the following:
class EventManager{ public: EventManager(); ~EventManager(); bool AddBinding(Binding *l_binding); bool RemoveBinding(std::string l_name); void SetFocus(const bool& l_focus); // Needs to be defined in the header! template<class T> bool AddCallback(const std::string& l_name, void(T::*l_func)(EventDetails*), T* l_instance) { auto temp = std::bind(l_func,l_instance, std::placeholders::_1); return m_callbacks.emplace(l_name, temp).second; } void RemoveCallback(const std::string& l_name){ m_callbacks.erase(l_name); } void HandleEvent(sf::Event& l_event); void Update(); sf::Vector2i GetMousePos(sf::RenderWindow* l_wind = nullptr){ return (l_wind ? sf...