2021-07-27 20:18:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gui/state.h"
|
|
|
|
#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-12 21:10:52 +02:00
|
|
|
explicit MainMenu(sf::RenderWindow& game_window, Callbacks&& callbacks);
|
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;
|
|
|
|
};
|
|
|
|
|