2021-10-23 19:04:29 +03:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Panel.h"
|
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
#include <LightEngine.h>
|
2021-10-23 19:04:29 +03:30
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
namespace Light {
|
|
|
|
|
2022-03-07 20:01:44 +03:30
|
|
|
class AssetBrowserPanel: public Panel
|
2022-03-06 22:25:23 +03:30
|
|
|
{
|
|
|
|
private:
|
2022-03-07 20:01:44 +03:30
|
|
|
enum AssetType
|
2021-10-23 19:04:29 +03:30
|
|
|
{
|
2022-03-06 22:25:23 +03:30
|
|
|
None = 0,
|
|
|
|
Directory,
|
|
|
|
Text,
|
|
|
|
Image,
|
|
|
|
};
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
public:
|
2022-03-07 20:01:44 +03:30
|
|
|
AssetBrowserPanel();
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
void OnUserInterfaceUpdate();
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
private:
|
|
|
|
std::filesystem::path m_CurrentDirectory;
|
|
|
|
const std::filesystem::path m_AssetsPath;
|
|
|
|
|
|
|
|
// TODO: Save configuration
|
2022-03-07 20:01:44 +03:30
|
|
|
uint32_t m_FileSize = 128u;
|
|
|
|
uint32_t m_FilePadding = 8u;
|
2022-03-06 22:25:23 +03:30
|
|
|
|
|
|
|
Ref<Texture> m_DirectoryTexture;
|
2022-03-07 20:01:44 +03:30
|
|
|
Ref<Texture> m_ImageTexture;
|
|
|
|
Ref<Texture> m_TextTexture;
|
2022-03-06 22:25:23 +03:30
|
|
|
};
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
} // namespace Light
|