#pragma once #include #include class Input { public: enum Type { RealTime = 1, Pressed = 1 << 1, Released = 1 << 2 }; Input() = delete; Input(const Input& other); Input& operator=(const Input& other); Input(const sf::Keyboard::Key& key, int type=Type::RealTime|Type::Pressed); Input(const sf::Mouse::Button& button, int type=Type::RealTime|Type::Pressed); bool test() const; bool operator==(const sf::Event& event) const; bool operator==(const Input& other) const; private: template friend class InputTarget; sf::Event _event; int _type; };