Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef INPUTMANAGER_H
- #define INPUTMANAGER_H
- #include <SFML/Graphics/RenderWindow.hpp>
- #include <SFML/Window/Input.hpp>
- class InputManager
- {
- public:
- InputManager(sf::RenderWindow&);
- void Update();
- bool IsKeyDown(sf::Key::Code);
- bool IsKeyUp(sf::Key::Code);
- bool IsKeyReleased(sf::Key::Code);
- bool IsButtonDown(sf::Mouse::Button);
- bool IsButtonUp(sf::Mouse::Button);
- bool IsButtonReleased(sf::Mouse::Button);
- int MouseX();
- int MouseY();
- private:
- const sf::Input& m_mainInput;
- bool m_pressedKeys[sf::Key::Count];
- bool m_pressedButtons[sf::Mouse::ButtonCount];
- };
- #endif // INPUTMANAGER_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement