aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Scene.hpp
blob: 0e121e9576765870766cb8aea46db30d4f7610fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SCENE_HPP
#define SCENE_HPP

#include "Widget.hpp"

#include <SFML/Graphics.hpp>
#include <vector>

class Scene
{
public:
    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) {}

protected:
    std::vector<Widget> widgets;
    sf::RenderWindow &_window;

    Scene(sf::RenderWindow &window) : _window(window) {}
};

#endif