40 lines
928 B
C++
40 lines
928 B
C++
#pragma once
|
|
|
|
#include "Panel.h"
|
|
#include "UI/PopupState.h"
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
|
|
namespace XCEngine {
|
|
namespace Components {
|
|
class Component;
|
|
class GameObject;
|
|
}
|
|
|
|
namespace Editor {
|
|
|
|
class InspectorPanel : public Panel {
|
|
public:
|
|
InspectorPanel();
|
|
~InspectorPanel();
|
|
|
|
void OnAttach() override;
|
|
void OnDetach() override;
|
|
void Render() override;
|
|
|
|
private:
|
|
void RenderGameObject(::XCEngine::Components::GameObject* gameObject);
|
|
void RenderComponent(::XCEngine::Components::Component* component, ::XCEngine::Components::GameObject* gameObject);
|
|
void RenderEmptyState(const char* title, const char* subtitle = nullptr);
|
|
void OnSelectionChanged(const struct SelectionChangedEvent& event);
|
|
|
|
uint64_t m_selectionHandlerId = 0;
|
|
uint64_t m_selectedEntityId = 0;
|
|
UI::DeferredPopupState m_addComponentPopup;
|
|
std::function<void()> m_deferredContextAction;
|
|
};
|
|
|
|
}
|
|
}
|