forked from NaiJi/project-kyoku
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.
30 lines
712 B
C
30 lines
712 B
C
2 years ago
|
#pragma once
|
||
|
|
||
|
#include <vector>
|
||
|
#include <memory>
|
||
|
#include <array>
|
||
|
|
||
|
#include "../../include/application/state.h" // HOW? WHY DOESN'T "application/state.h" LINK ON BY ITSELF
|
||
|
#include "core/corefactory.h"
|
||
|
|
||
|
class Application
|
||
|
{
|
||
|
public:
|
||
|
virtual ~Application() = default;
|
||
|
virtual bool init();
|
||
|
virtual void display() = 0;
|
||
|
virtual void run() = 0;
|
||
|
|
||
|
void input(const kku::SystemEvent& input);
|
||
|
void update(const kku::microsec& dt);
|
||
|
|
||
|
protected:
|
||
|
std::shared_ptr<kku::CoreFactory> _core_factory;
|
||
|
|
||
|
std::array<std::shared_ptr<GUIState>, GUIState::Tag::AMOUNT> _states;
|
||
|
std::vector<std::shared_ptr<GUIState>> _state_stack;
|
||
|
|
||
|
void pushState(GUIState::Tag new_state);
|
||
|
void popState();
|
||
|
};
|