You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
843 B
C
43 lines
843 B
C
3 years ago
|
#ifndef APPLICATION_H
|
||
|
#define APPLICATION_H
|
||
|
|
||
3 years ago
|
#include <vector>
|
||
3 years ago
|
#include <memory>
|
||
3 years ago
|
#include <array>
|
||
3 years ago
|
|
||
|
#include <SFML/Graphics/RenderWindow.hpp>
|
||
|
#include <SFML/Graphics/Font.hpp>
|
||
3 years ago
|
#include <SFML/System/Clock.hpp>
|
||
3 years ago
|
#include <SFML/Window/Keyboard.hpp>
|
||
3 years ago
|
#include <SFML/Window/Event.hpp>
|
||
3 years ago
|
|
||
3 years ago
|
#include "core/game.h"
|
||
|
#include "state.h"
|
||
3 years ago
|
|
||
3 years ago
|
#include "tools/resourceholder.h"
|
||
|
|
||
3 years ago
|
class Application
|
||
|
{
|
||
|
public:
|
||
|
Application();
|
||
|
void run();
|
||
3 years ago
|
void input();
|
||
3 years ago
|
void update(const sf::Time& dt);
|
||
3 years ago
|
void draw();
|
||
|
|
||
|
private:
|
||
3 years ago
|
std::array<std::shared_ptr<GUIState>, GUIState::Tag::AMOUNT> _states;
|
||
|
std::vector<std::shared_ptr<GUIState>> _state_stack;
|
||
|
|
||
3 years ago
|
sf::RenderWindow _game_window;
|
||
3 years ago
|
std::shared_ptr<Game> _game;
|
||
3 years ago
|
|
||
3 years ago
|
void exec();
|
||
3 years ago
|
void pushState(GUIState::Tag new_state);
|
||
|
void popState();
|
||
3 years ago
|
|
||
|
FontHolder _font_holder;
|
||
3 years ago
|
};
|
||
|
|
||
|
#endif // APPLICATION_H
|