2021-10-23 19:04:29 +03:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <filesystem>
|
2025-07-20 04:46:15 +03:30
|
|
|
#include <mirror/panels/panel.hpp>
|
2025-07-11 02:35:28 +03:30
|
|
|
#include <renderer/texture.hpp>
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
namespace lt {
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2025-07-11 01:16:52 +03:30
|
|
|
class Scene;
|
|
|
|
|
2022-03-07 20:01:44 +03:30
|
|
|
class AssetBrowserPanel: public Panel
|
2022-03-06 22:25:23 +03:30
|
|
|
{
|
2025-07-05 15:36:53 +03:30
|
|
|
public:
|
2025-07-06 14:09:58 +03:30
|
|
|
AssetBrowserPanel(Ref<Scene> active_scene);
|
2025-07-05 15:36:53 +03:30
|
|
|
|
|
|
|
void on_user_interface_update();
|
|
|
|
|
2022-03-06 22:25:23 +03:30
|
|
|
private:
|
2022-03-12 21:10:23 +03:30
|
|
|
enum class AssetType
|
2021-10-23 19:04:29 +03:30
|
|
|
{
|
2025-07-06 14:09:58 +03:30
|
|
|
none = 0,
|
|
|
|
scene,
|
|
|
|
directory,
|
|
|
|
text,
|
|
|
|
image,
|
2022-03-06 22:25:23 +03:30
|
|
|
};
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
std::filesystem::path m_current_directory;
|
2025-07-05 15:36:53 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
const std::filesystem::path m_assets_path;
|
2022-03-06 22:25:23 +03:30
|
|
|
|
2025-07-06 15:10:34 +03:30
|
|
|
float m_file_size = 128.0f;
|
2025-07-05 15:36:53 +03:30
|
|
|
|
2025-07-06 15:10:34 +03:30
|
|
|
float m_file_padding = 8.0f;
|
2022-03-06 22:25:23 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
Ref<Scene> m_active_scene;
|
2022-03-12 21:10:23 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
Ref<Texture> m_directory_texture;
|
2025-07-05 15:36:53 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
Ref<Texture> m_scene_texture;
|
2025-07-05 15:36:53 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
Ref<Texture> m_image_texture;
|
2025-07-05 15:36:53 +03:30
|
|
|
|
2025-07-05 14:23:01 +03:30
|
|
|
Ref<Texture> m_text_texture;
|
2022-03-06 22:25:23 +03:30
|
|
|
};
|
2021-10-23 19:04:29 +03:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
} // namespace lt
|