Files
XCEngine/new_editor/app/Icons/ProductBuiltInIcons.h

43 lines
1.1 KiB
C++

#pragma once
#include <Host/NativeRenderer.h>
#include <XCEngine/UI/Types.h>
#include <cstdint>
#include <filesystem>
#include <string>
namespace XCEngine::UI::Editor::App {
enum class ProductBuiltInIconKind : std::uint8_t {
Folder = 0,
GameObject,
Scene
};
class ProductBuiltInIcons {
public:
void Initialize(
Host::NativeRenderer& renderer,
const std::filesystem::path& repoRoot);
void Shutdown();
const ::XCEngine::UI::UITextureHandle& Resolve(ProductBuiltInIconKind kind) const;
const std::string& GetLastError() const;
private:
std::filesystem::path ResolveFolderIconPath() const;
std::filesystem::path ResolveGameObjectIconPath() const;
std::filesystem::path ResolveSceneIconPath() const;
Host::NativeRenderer* m_renderer = nullptr;
std::filesystem::path m_repoRoot = {};
::XCEngine::UI::UITextureHandle m_folderIcon = {};
::XCEngine::UI::UITextureHandle m_gameObjectIcon = {};
::XCEngine::UI::UITextureHandle m_sceneIcon = {};
std::string m_lastError = {};
};
} // namespace XCEngine::UI::Editor::App