#pragma once

/*
	GameEngine and Editor
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Assets

#include "Nk.h"
#include "IRenderDevice.h"

namespace GameEngine {

struct FontDesc
{
    const char*         fontFile;
    float               fontSize;
    struct nk_font*     font;
};

struct ImageDesc
{
    const char*         imageFile;
    struct nk_image     image;
};

class Assets
{
public:
    Assets();
    ~Assets();

    template <size_t N>
    void InitFonts(IRenderDevice& device, FontDesc (&fontList)[N])
    {
        InitFonts(device, fontList, N);
    }

    template <size_t N>
    void LoadImages(IRenderDevice& device, ImageDesc (&imageList)[N])
    {
        LoadImages(device, imageList, N);
    }

    void InitFonts(IRenderDevice& device, FontDesc* fontList, size_t fontListSize);
    void LoadImages(IRenderDevice& device, ImageDesc* imageList, size_t imageListSize);

private:
    struct nk_font_atlas atlas;
};

} // GameEngine namespace
