#pragma once

#include <render/sprite/image.h>
#include <list>
#include "defs.hpp"
#include "scene.h"
#include "statistic.h"

namespace game {

enum class MenuState
{
    mainMenu = 0,
    levelSelector,
    settings,
    levelPreview,
    levelResult,
};

class Menu: public Scene
{
private:
    std::list<levelInfo*> levelList;
    MenuState state, oldState;
    Statistic *stats;
    render::sprite::image *image;

    bool shouldSaveStatistic;
public:
    Menu();
    virtual ~Menu();

    virtual void Show();
    virtual void Update();

    void ShowLevelSelector()
    {
        state = MenuState::levelSelector;
    }
    //virtual void Render();
private:

    void LoadLevelList();

    void UpdateLevelSelector();
    void UpdateMainMenu();
    void UpdateSettings();
    void UpdateLevelResult();
    void UpdateLevelPreview();
};

}
