31 lines
677 B
C++
31 lines
677 B
C++
#pragma once
|
|
|
|
#include "gui/state.h"
|
|
#include "tools/resourceholder.h"
|
|
#include <SFML/Graphics/RenderWindow.hpp>
|
|
|
|
class Group;
|
|
|
|
class MainMenu : public GUIState
|
|
{
|
|
public:
|
|
|
|
struct Callbacks
|
|
{
|
|
std::function<void(void)> onAppendGameState;
|
|
};
|
|
|
|
explicit MainMenu(sf::RenderWindow& game_window, Callbacks&& callbacks, const FontHolder &font_holder);
|
|
virtual void input(const sf::Event& event) override;
|
|
virtual void update(const sf::Time& dt) override;
|
|
virtual void draw() const override;
|
|
|
|
virtual void enter() override;
|
|
virtual void leave() override;
|
|
|
|
private:
|
|
std::shared_ptr<Group> _buttons;
|
|
sf::RenderWindow& _game_window;
|
|
};
|
|
|