2021-07-27 20:18:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gui/state.h"
|
2021-08-26 19:41:16 +02:00
|
|
|
#include "tools/resourceholder.h"
|
2021-07-27 20:18:37 +02:00
|
|
|
#include <SFML/Graphics/RenderWindow.hpp>
|
|
|
|
|
|
|
|
class Group;
|
|
|
|
|
|
|
|
class MainMenu : public GUIState
|
|
|
|
{
|
|
|
|
public:
|
2021-08-03 20:42:58 +02:00
|
|
|
|
|
|
|
struct Callbacks
|
|
|
|
{
|
|
|
|
std::function<void(void)> onAppendGameState;
|
|
|
|
};
|
|
|
|
|
2021-08-26 19:41:16 +02:00
|
|
|
explicit MainMenu(sf::RenderWindow& game_window, Callbacks&& callbacks, const FontHolder &font_holder);
|
2021-07-27 20:18:37 +02:00
|
|
|
virtual void input(const sf::Event& event) override;
|
|
|
|
virtual void update() override;
|
2021-08-03 20:42:58 +02:00
|
|
|
virtual void draw() const override;
|
|
|
|
|
|
|
|
virtual void enter() override;
|
|
|
|
virtual void leave() override;
|
2021-07-27 20:18:37 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Group> _buttons;
|
|
|
|
sf::RenderWindow& _game_window;
|
|
|
|
};
|
|
|
|
|