refactor(editor): isolate engine service boundaries
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Panels/EditorPanelServices.h"
|
||||
#include "UtilityWindows/EditorUtilityWindowRuntime.h"
|
||||
#include "State/EditorColorPickerToolState.h"
|
||||
#include "Inspector/InspectorFieldValueApplier.h"
|
||||
#include <XCEditor/Collections/UIEditorScrollView.h>
|
||||
#include <XCEditor/Fields/UIEditorFieldStyle.h>
|
||||
#include <XCEditor/Foundation/UIEditorPanelInputFilter.h>
|
||||
@@ -702,27 +703,11 @@ bool InspectorPanel::ApplyChangedField(std::string_view fieldId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const IInspectorComponentEditor* editor =
|
||||
InspectorComponentEditorRegistry::Get().FindEditor(binding->typeName);
|
||||
if (editor == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
InspectorComponentEditorContext context = {};
|
||||
context.gameObject = &m_subject.sceneObject.object;
|
||||
context.componentId = binding->componentId;
|
||||
context.typeName = binding->typeName;
|
||||
context.displayName = binding->displayName;
|
||||
context.removable = binding->removable;
|
||||
for (const EditorSceneComponentDescriptor& descriptor :
|
||||
m_sceneRuntime->GetSelectedComponents()) {
|
||||
if (descriptor.componentId == binding->componentId) {
|
||||
context.component = descriptor.view.get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return editor->ApplyFieldValue(*m_sceneRuntime, context, field);
|
||||
return ApplyInspectorComponentBoundFieldValue(
|
||||
*m_sceneRuntime,
|
||||
m_subject.sceneObject,
|
||||
*binding,
|
||||
field);
|
||||
}
|
||||
|
||||
void InspectorPanel::Update(
|
||||
|
||||
Reference in New Issue
Block a user