diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/cpp/Subconscious.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/cpp/Subconscious.cpp b/src/main/cpp/Subconscious.cpp index b53a38b..542e580 100644 --- a/src/main/cpp/Subconscious.cpp +++ b/src/main/cpp/Subconscious.cpp @@ -32,6 +32,22 @@ void Subconscious::run() switch (event.type) { /*** Keyboard Events ***/ case sf::Event::KeyPressed: + switch (event.key.code) { + case sf::Keyboard::Up: + _currentScene->pan(0, 10); + break; + case sf::Keyboard::Down: + _currentScene->pan(0, -10); + break; + case sf::Keyboard::Left: + _currentScene->pan(10, 0); + break; + case sf::Keyboard::Right: + _currentScene->pan(-10, 0); + break; + default: + break; + } break; case sf::Event::KeyReleased: @@ -66,6 +82,8 @@ void Subconscious::run() case sf::Event::Resized: _currentScene->resize(event.size); break; + default: + break; } } |