Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
AssetInfoPanel.h
Go to the documentation of this file.
1/*
2 * Olympe Blueprint Editor - Asset Info Panel
3 * Frontend component that uses BlueprintEditor backend for asset metadata
4 */
5
6#pragma once
7
8#include <string>
9#include <vector>
10
11namespace Olympe
12{
13 // Forward declarations
14 class BlueprintEditor;
15 struct AssetMetadata;
16
18 {
19 public:
22
23 // Load asset information from file (delegates to backend)
24 void LoadAsset(const std::string& filepath);
25
26 // Clear current asset info
27 void Clear();
28
29 // Render the info panel with ImGui
30 void Render();
31
32 // Check if panel has valid asset loaded
33 bool HasAsset() const;
34
35 // Get current asset info (from cached backend data)
36 const AssetMetadata& GetAssetInfo() const { return *m_CurrentAsset; }
37
38 // Get the filepath of the currently loaded asset
39 const std::string& GetLoadedFilepath() const { return m_LoadedFilepath; }
40
41 private:
42 // Render different asset type details
45 void RenderGenericInfo();
46 void RenderErrorInfo();
47
48 private:
49 AssetMetadata* m_CurrentAsset; // Points to cached backend data
50 std::string m_LoadedFilepath; // Track which file is loaded
51 };
52}
void LoadAsset(const std::string &filepath)
AssetMetadata * m_CurrentAsset
const AssetMetadata & GetAssetInfo() const
const std::string & GetLoadedFilepath() const