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.
project-kyoku/src/application/application.h

41 lines
823 B
C++

#pragma once
#include <vector>
#include <memory>
#include <array>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Font.hpp>
#include <SFML/System/Clock.hpp>
#include <SFML/Window/Keyboard.hpp>
#include <SFML/Window/Event.hpp>
#include "core/game.h"
#include "state.h"
#include "tools/music.h"
#include "tools/resourceholder.h"
class Application
{
public:
explicit Application();
void run();
void input();
void update(const sf::Time& dt);
void draw();
private:
std::array<std::shared_ptr<GUIState>, GUIState::Tag::AMOUNT> _states;
std::vector<std::shared_ptr<GUIState>> _state_stack;
std::shared_ptr<sf::RenderWindow> _game_window;
Music _music;
void exec();
void pushState(GUIState::Tag new_state);
void popState();
FontHolder _font_holder;
};