project-kyoku/include/state.h

36 lines
719 B
C
Raw Normal View History

#pragma once
#include <stack>
#include <memory>
2021-08-21 08:29:58 -04:00
#include <functional>
2021-12-27 13:41:25 -05:00
#include <SFML/Window/Event.hpp>
2021-12-27 13:41:25 -05:00
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Rect.hpp>
2021-12-27 13:41:25 -05:00
class GUIState : public sf::Drawable
{
2021-07-27 14:18:37 -04:00
public:
2021-08-03 14:42:58 -04:00
enum Tag {
SPLASH_SCREEN,
MAIN_MENU,
GAME_PICKER,
GAME,
EDITOR_PICKER,
EDITOR,
SETTINGS,
AMOUNT
};
virtual ~GUIState() = default;
2021-07-27 14:18:37 -04:00
virtual void input(const sf::Event& event) = 0;
virtual void update(const sf::Time& dt) = 0;
2021-12-27 13:41:25 -05:00
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const override = 0;
2021-08-03 14:42:58 -04:00
2021-12-27 13:41:25 -05:00
virtual void enter(sf::Vector2u&& render_size) = 0;
2021-08-03 14:42:58 -04:00
virtual void leave() = 0;
};