Files
XCEngine/new_editor/app/Features/Inspector/InspectorPanel.h

46 lines
1.1 KiB
C++

#pragma once
#include "State/EditorSession.h"
#include <XCEditor/Panels/UIEditorPanelContentHost.h>
#include <XCEngine/UI/DrawData.h>
#include <string>
#include <vector>
namespace XCEngine::UI::Editor::App {
class InspectorPanel {
public:
void Update(
const EditorSession& 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 EditorSession& 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