45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "Core/ProductEditorSession.h"
|
||
|
|
|
||
|
|
#include <XCEditor/Shell/UIEditorPanelContentHost.h>
|
||
|
|
|
||
|
|
#include <XCEngine/UI/DrawData.h>
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
namespace XCEngine::UI::Editor::App {
|
||
|
|
|
||
|
|
class ProductInspectorPanel {
|
||
|
|
public:
|
||
|
|
void Update(
|
||
|
|
const ProductEditorSession& session,
|
||
|
|
const UIEditorPanelContentHostFrame& contentHostFrame);
|
||
|
|
void Append(::XCEngine::UI::UIDrawList& drawList) const;
|
||
|
|
|
||
|
|
private:
|
||
|
|
struct SectionRow {
|
||
|
|
std::string label = {};
|
||
|
|
std::string value = {};
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Section {
|
||
|
|
std::string title = {};
|
||
|
|
std::vector<SectionRow> rows = {};
|
||
|
|
};
|
||
|
|
|
||
|
|
const UIEditorPanelContentHostPanelState* FindMountedInspectorPanel(
|
||
|
|
const UIEditorPanelContentHostFrame& contentHostFrame) const;
|
||
|
|
void BuildPresentation(const ProductEditorSession& session);
|
||
|
|
|
||
|
|
bool m_visible = false;
|
||
|
|
bool m_hasSelection = false;
|
||
|
|
::XCEngine::UI::UIRect m_bounds = {};
|
||
|
|
std::string m_title = {};
|
||
|
|
std::string m_subtitle = {};
|
||
|
|
std::vector<Section> m_sections = {};
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace XCEngine::UI::Editor::App
|