aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp/Subconscious.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/cpp/Subconscious.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/cpp/Subconscious.cpp b/src/main/cpp/Subconscious.cpp
index b53a38b..a4f6128 100644
--- a/src/main/cpp/Subconscious.cpp
+++ b/src/main/cpp/Subconscious.cpp
@@ -55,7 +55,11 @@ void Subconscious::run()
//
// std::cout << std::fixed << std::setprecision(3)
// << event.mouseWheelScroll.delta << std::endl;
- _currentScene->zoom(event.mouseWheelScroll.delta/10.0);
+
+ if (_currentScene->type == Scene::Type::WORLD) {
+ static_cast<WorldScene*>(_currentScene)->zoom(event.mouseWheelScroll.delta/10.0);
+ }
+
break;
/*** Window Events ***/
@@ -66,6 +70,9 @@ void Subconscious::run()
case sf::Event::Resized:
_currentScene->resize(event.size);
break;
+
+ default:
+ break;
}
}