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.

32 lines
728 B
C++

#pragma once
#include "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;
std::function<void(void)> onAppendEditorState;
};
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;
};