aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Scene.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-12 19:31:45 +0100
committerNao Pross <naopross@thearcway.org>2018-02-12 19:31:45 +0100
commit43d0e11b4c9cd601f23cfe99a188ede598be418c (patch)
tree6a31fffae507997c0038177cbbccc984a468be04 /src/main/headers/Scene.hpp
parentUpdate gitignore to ignore ctags (diff)
downloadSubconscious-old-43d0e11b4c9cd601f23cfe99a188ede598be418c.tar.gz
Subconscious-old-43d0e11b4c9cd601f23cfe99a188ede598be418c.zip
Fix zoom bug, add Scene.type member
Diffstat (limited to 'src/main/headers/Scene.hpp')
-rw-r--r--src/main/headers/Scene.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/headers/Scene.hpp b/src/main/headers/Scene.hpp
index 757202c..2183d63 100644
--- a/src/main/headers/Scene.hpp
+++ b/src/main/headers/Scene.hpp
@@ -6,21 +6,26 @@
class Scene
{
public:
- constexpr static float MAX_ZOOM = 10;
- constexpr static float MIN_ZOOM = .1;
+ enum Type
+ {
+ WORLD, MENU
+ };
+
+ const Type type;
+
+ Scene() = delete;
virtual void render() = 0;
virtual void resize(const sf::Event::SizeEvent &size) = 0;
virtual void click(const sf::Event::MouseButtonEvent &click) {}
virtual void keyPress(const sf::Event::KeyEvent &event) {}
- virtual void zoom(float factor) {}
protected:
float _zoom = 1;
sf::RenderWindow &_window;
- Scene(sf::RenderWindow &window) : _window(window) {}
+ Scene(sf::RenderWindow &window, Type _type) : type(_type), _window(window) {}
};
#endif