#pragma once

#include "DangerousRacers/Button.h"
#include "DangerousRacers/Scene.h"
#include "SFML/Graphics/Sprite.hpp"
#include "SFML/Graphics/Texture.hpp"

class MainMenuScene : public Scene {
private:
    sf::Texture backgroundTexture;
    sf::Sprite backgroundSprite;

    sf::Texture titleTexture;
    sf::Sprite titleSprite;

    Button tutorialButton{"Tutorial", {405.f / 2.f, 720.f * 0.25}, [&] { return startTutorialLevel(); }};
    Button playButton{"Play", {405.f / 2.f, 720.f * 0.35}, [&] { return playLevelOne(); }};
    Button quitButton{"Quit", {405.f / 2.f, 720.f * 0.45}, [&] { return sceneManager._quit(); }};
public:
    MainMenuScene(SceneManager& _sceneManager);

    void start();
    void update(float deltaTime);
    void render(sf::RenderWindow& window);
    void eventHandler(sf::Event& event);

    void startTutorialLevel() const;
    void playLevelOne() const;
};