A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat: Add property editors and improve InspectorPanel
esengine0fc1ac676808
diff --git a/src/esengine/editor/CMakeLists.txt b/src/esengine/editor/CMakeLists.txtindex b2e01038b..9a65e5fec 100644--- a/src/esengine/editor/CMakeLists.txt+++ b/src/esengine/editor/CMakeLists.txt@@ -16,6 +16,10 @@ set(EDITOR_SOURCESproperty/PropertyEditor.cppproperty/editors/FloatEditor.cppproperty/editors/Vector3Editor.cpp+ property/editors/Vector2Editor.cpp+ property/editors/BoolEditor.cpp+ property/editors/IntEditor.cpp+ property/editors/StringEditor.cpp# Cameracamera/EditorCamera.cpp@@ -67,6 +71,10 @@ set(EDITOR_HEADERSproperty/PropertyEditor.hppproperty/editors/FloatEditor.hppproperty/editors/Vector3Editor.hpp+ property/editors/Vector2Editor.hpp+ property/editors/BoolEditor.hpp+ property/editors/IntEditor.hpp+ property/editors/StringEditor.hpp# Cameracamera/EditorCamera.hppdiff --git a/src/esengine/editor/panels/InspectorPanel.cpp b/src/esengine/editor/panels/InspectorPanel.cppindex a5f331296..aff0e0d06 100644--- a/src/esengine/editor/panels/InspectorPanel.cpp+++ b/src/esengine/editor/panels/InspectorPanel.cpp@@ -12,6 +12,8 @@#include "InspectorPanel.hpp"#include "../../ecs/components/Transform.hpp"#include "../../ecs/components/Common.hpp"+#include "../../ecs/components/Camera.hpp"+#include "../../ecs/components/Sprite.hpp"#include "../../math/Math.hpp"#include "../../events/Sink.hpp"#include "../../core/Log.hpp"@@ -218,6 +220,8 @@ void InspectorPanel::rebuildInspector() {entityNameLabel_->setColor(textColor);}+ addTagsEditor(currentEntity_);+if (registry_.has<ecs::Name>(currentEntity_)) {addNameEditor(currentEntity_);}@@ -225,35 +229,58 @@ void InspectorPanel::rebuildInspector() {if (registry_.has<ecs::LocalTransform>(currentEntity_)) {addLocalTransformEditor(currentEntity_);}++ if (registry_.has<ecs::Camera>(currentEntity_)) {+ addCameraEditor(currentEntity_);+ }++ if (registry_.has<ecs::Sprite>(currentEntity_)) {+ addSpriteEditor(currentEntity_);+ }}void InspectorPanel::clearInspector() {+ editorConnections_.disconnectAll();if (contentPanel_) {contentPanel_->clearChildren();}- editorConnections_.disconnectAll();}void InspectorPanel::addNameEditor(Entity entity) {- constexpr glm::vec4 sectionBg{0.145f, 0.145f, 0.149f, 1.0f};- constexpr glm::vec4 labelColor{0.686f, 0.686f, 0.686f, 1.0f}; // #afafaf- constexpr glm::vec4 valueColor{0.878f, 0.878f, 0.878f, 1.0f}; // #e0e0e0-auto section = createComponentSection("Name", ui::icons::User);auto& name = registry_.get<ecs::Name>(entity);- auto row = makeUnique<ui::Panel>(ui::WidgetId(section->getId().path + "_row"));- row->setHeight(ui::SizeValue::px(26.0f));- row->setWidth(ui::SizeValue::flex(1.0f));- row->setPadding(ui::Insets(4.0f, 12.0f, 4.0f, 12.0f));+ auto content = makeUnique<ui::Panel>(ui::WidgetId(section->getId().path + "_content"));+ content->setLayout(makeUnique<ui::StackLayout>(ui::StackDirection::Vertical, 4.0f));+ content->setWidth(ui::SizeValue::flex(1.0f));+ content->setHeight(ui::SizeValue::autoSize());+ content->setPadding(ui::Insets(8.0f, 12.0f, 8.0f, 12.0f));++ auto nameEditor = makeUnique<StringEditor>(+ ui::WidgetId(content->getId().path + "_name"),+ "name");+ nameEditor->setLabel("Name");+ nameEditor->setValue(name.value);+ nameEditor->setCommandHistory(&history_);- auto valueLabel = makeUnique<ui::Label>(ui::WidgetId(row->getId().path + "_value"));- valueLabel->setText(name.value);- valueLabel->setFontSize(12.0f);- valueLabel->setColor(valueColor);- row->addChild(std::move(valueLabel));+ editorConnections_.add(sink(nameEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Name>(entity)) {+ auto& n = registry_.get<ecs::Name>(entity);+ try {+ n.value = std::any_cast<std::string>(value);+ if (entityNameLabel_) {+ entityNameLabel_->setText(n.value);+ }+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast name value");+ }+ }+ }+ ));- section->addChild(std::move(row));+ content->addChild(std::move(nameEditor));+ section->addChild(std::move(content));}void InspectorPanel::addLocalTransformEditor(Entity entity) {@@ -338,4 +365,321 @@ void InspectorPanel::addLocalTransformEditor(Entity entity) {section->addChild(std::move(content));}+void InspectorPanel::addCameraEditor(Entity entity) {+ auto section = createComponentSection("Camera", ui::icons::Camera);+ auto& camera = registry_.get<ecs::Camera>(entity);++ auto content = makeUnique<ui::Panel>(ui::WidgetId(section->getId().path + "_content"));+ content->setLayout(makeUnique<ui::StackLayout>(ui::StackDirection::Vertical, 4.0f));+ content->setWidth(ui::SizeValue::flex(1.0f));+ content->setHeight(ui::SizeValue::autoSize());+ content->setPadding(ui::Insets(8.0f, 12.0f, 8.0f, 12.0f));++ auto fovEditor = makeUnique<FloatEditor>(+ ui::WidgetId(content->getId().path + "_fov"),+ "fov");+ fovEditor->setLabel("FOV");+ fovEditor->setValue(camera.fov);+ fovEditor->setRange(1.0f, 180.0f);+ fovEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(fovEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Camera>(entity)) {+ auto& c = registry_.get<ecs::Camera>(entity);+ try {+ c.fov = std::any_cast<f32>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast fov value");+ }+ }+ }+ ));++ content->addChild(std::move(fovEditor));++ auto nearEditor = makeUnique<FloatEditor>(+ ui::WidgetId(content->getId().path + "_near"),+ "nearPlane");+ nearEditor->setLabel("Near");+ nearEditor->setValue(camera.nearPlane);+ nearEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(nearEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Camera>(entity)) {+ auto& c = registry_.get<ecs::Camera>(entity);+ try {+ c.nearPlane = std::any_cast<f32>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast nearPlane value");+ }+ }+ }+ ));++ content->addChild(std::move(nearEditor));++ auto farEditor = makeUnique<FloatEditor>(+ ui::WidgetId(content->getId().path + "_far"),+ "farPlane");+ farEditor->setLabel("Far");+ farEditor->setValue(camera.farPlane);+ farEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(farEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Camera>(entity)) {+ auto& c = registry_.get<ecs::Camera>(entity);+ try {+ c.farPlane = std::any_cast<f32>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast farPlane value");+ }+ }+ }+ ));++ content->addChild(std::move(farEditor));++ auto activeEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_active"),+ "isActive");+ activeEditor->setLabel("Active");+ activeEditor->setValue(camera.isActive);+ activeEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(activeEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Camera>(entity)) {+ auto& c = registry_.get<ecs::Camera>(entity);+ try {+ c.isActive = std::any_cast<bool>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast isActive value");+ }+ }+ }+ ));++ content->addChild(std::move(activeEditor));++ auto priorityEditor = makeUnique<IntEditor>(+ ui::WidgetId(content->getId().path + "_priority"),+ "priority");+ priorityEditor->setLabel("Priority");+ priorityEditor->setValue(camera.priority);+ priorityEditor->setRange(-100, 100);+ priorityEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(priorityEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Camera>(entity)) {+ auto& c = registry_.get<ecs::Camera>(entity);+ try {+ c.priority = std::any_cast<i32>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast priority value");+ }+ }+ }+ ));++ content->addChild(std::move(priorityEditor));++ section->addChild(std::move(content));+}++void InspectorPanel::addSpriteEditor(Entity entity) {+ auto section = createComponentSection("Sprite", ui::icons::Image);+ auto& sprite = registry_.get<ecs::Sprite>(entity);++ auto content = makeUnique<ui::Panel>(ui::WidgetId(section->getId().path + "_content"));+ content->setLayout(makeUnique<ui::StackLayout>(ui::StackDirection::Vertical, 4.0f));+ content->setWidth(ui::SizeValue::flex(1.0f));+ content->setHeight(ui::SizeValue::autoSize());+ content->setPadding(ui::Insets(8.0f, 12.0f, 8.0f, 12.0f));++ auto sizeEditor = makeUnique<Vector2Editor>(+ ui::WidgetId(content->getId().path + "_size"),+ "size");+ sizeEditor->setLabel("Size");+ sizeEditor->setValue(sprite.size);+ sizeEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(sizeEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Sprite>(entity)) {+ auto& s = registry_.get<ecs::Sprite>(entity);+ try {+ s.size = std::any_cast<glm::vec2>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast size value");+ }+ }+ }+ ));++ content->addChild(std::move(sizeEditor));++ auto layerEditor = makeUnique<IntEditor>(+ ui::WidgetId(content->getId().path + "_layer"),+ "layer");+ layerEditor->setLabel("Layer");+ layerEditor->setValue(sprite.layer);+ layerEditor->setRange(-1000, 1000);+ layerEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(layerEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Sprite>(entity)) {+ auto& s = registry_.get<ecs::Sprite>(entity);+ try {+ s.layer = std::any_cast<i32>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast layer value");+ }+ }+ }+ ));++ content->addChild(std::move(layerEditor));++ auto flipXEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_flipX"),+ "flipX");+ flipXEditor->setLabel("Flip X");+ flipXEditor->setValue(sprite.flipX);+ flipXEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(flipXEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Sprite>(entity)) {+ auto& s = registry_.get<ecs::Sprite>(entity);+ try {+ s.flipX = std::any_cast<bool>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast flipX value");+ }+ }+ }+ ));++ content->addChild(std::move(flipXEditor));++ auto flipYEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_flipY"),+ "flipY");+ flipYEditor->setLabel("Flip Y");+ flipYEditor->setValue(sprite.flipY);+ flipYEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(flipYEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (registry_.valid(entity) && registry_.has<ecs::Sprite>(entity)) {+ auto& s = registry_.get<ecs::Sprite>(entity);+ try {+ s.flipY = std::any_cast<bool>(value);+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast flipY value");+ }+ }+ }+ ));++ content->addChild(std::move(flipYEditor));++ section->addChild(std::move(content));+}++void InspectorPanel::addTagsEditor(Entity entity) {+ auto section = createComponentSection("Tags", ui::icons::Check);++ auto content = makeUnique<ui::Panel>(ui::WidgetId(section->getId().path + "_content"));+ content->setLayout(makeUnique<ui::StackLayout>(ui::StackDirection::Vertical, 4.0f));+ content->setWidth(ui::SizeValue::flex(1.0f));+ content->setHeight(ui::SizeValue::autoSize());+ content->setPadding(ui::Insets(8.0f, 12.0f, 8.0f, 12.0f));++ bool hasActive = registry_.has<ecs::Active>(entity);+ auto activeEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_active"),+ "active");+ activeEditor->setLabel("Active");+ activeEditor->setValue(hasActive);+ activeEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(activeEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (!registry_.valid(entity)) return;+ try {+ bool active = std::any_cast<bool>(value);+ if (active && !registry_.has<ecs::Active>(entity)) {+ registry_.emplace<ecs::Active>(entity);+ } else if (!active && registry_.has<ecs::Active>(entity)) {+ registry_.remove<ecs::Active>(entity);+ }+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast active value");+ }+ }+ ));++ content->addChild(std::move(activeEditor));++ bool hasVisible = registry_.has<ecs::Visible>(entity);+ auto visibleEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_visible"),+ "visible");+ visibleEditor->setLabel("Visible");+ visibleEditor->setValue(hasVisible);+ visibleEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(visibleEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (!registry_.valid(entity)) return;+ try {+ bool visible = std::any_cast<bool>(value);+ if (visible && !registry_.has<ecs::Visible>(entity)) {+ registry_.emplace<ecs::Visible>(entity);+ } else if (!visible && registry_.has<ecs::Visible>(entity)) {+ registry_.remove<ecs::Visible>(entity);+ }+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast visible value");+ }+ }+ ));++ content->addChild(std::move(visibleEditor));++ bool hasStatic = registry_.has<ecs::Static>(entity);+ auto staticEditor = makeUnique<BoolEditor>(+ ui::WidgetId(content->getId().path + "_static"),+ "static");+ staticEditor->setLabel("Static");+ staticEditor->setValue(hasStatic);+ staticEditor->setCommandHistory(&history_);++ editorConnections_.add(sink(staticEditor->onValueChanged).connect(+ [this, entity](const std::any& value) {+ if (!registry_.valid(entity)) return;+ try {+ bool isStatic = std::any_cast<bool>(value);+ if (isStatic && !registry_.has<ecs::Static>(entity)) {+ registry_.emplace<ecs::Static>(entity);+ } else if (!isStatic && registry_.has<ecs::Static>(entity)) {+ registry_.remove<ecs::Static>(entity);+ }+ } catch (const std::bad_any_cast&) {+ ES_LOG_ERROR("Failed to cast static value");+ }+ }+ ));++ content->addChild(std::move(staticEditor));++ section->addChild(std::move(content));+}+} // namespace esengine::editordiff --git a/src/esengine/editor/panels/InspectorPanel.hpp b/src/esengine/editor/panels/InspectorPanel.hppindex b6d8df3e6..879393cd0 100644--- a/src/esengine/editor/panels/InspectorPanel.hpp+++ b/src/esengine/editor/panels/InspectorPanel.hpp@@ -25,6 +25,11 @@#include "../core/Selection.hpp"#include "../command/CommandHistory.hpp"#include "../property/editors/Vector3Editor.hpp"+#include "../property/editors/Vector2Editor.hpp"+#include "../property/editors/FloatEditor.hpp"+#include "../property/editors/BoolEditor.hpp"+#include "../property/editors/IntEditor.hpp"+#include "../property/editors/StringEditor.hpp"#include "../../events/Connection.hpp"#include <unordered_set>@@ -82,8 +87,11 @@ private:void toggleSection(const std::string& name);// Component editors- void addLocalTransformEditor(Entity entity);void addNameEditor(Entity entity);+ void addLocalTransformEditor(Entity entity);+ void addCameraEditor(Entity entity);+ void addSpriteEditor(Entity entity);+ void addTagsEditor(Entity entity);ecs::Registry& registry_;EntitySelection& selection_;diff --git a/src/esengine/editor/property/editors/BoolEditor.cpp b/src/esengine/editor/property/editors/BoolEditor.cppnew file mode 100644index 000000000..d8bab897b--- /dev/null+++ b/src/esengine/editor/property/editors/BoolEditor.cpp@@ -0,0 +1,154 @@+/**+ * @file BoolEditor.cpp+ * @brief BoolEditor implementation+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */++#include "BoolEditor.hpp"+#include "../../command/PropertyCommand.hpp"+#include "../../../ui/UIContext.hpp"+#include "../../../ui/rendering/UIBatchRenderer.hpp"+#include "../../../events/Sink.hpp"++namespace esengine::editor {++// =============================================================================+// Constructor+// =============================================================================++BoolEditor::BoolEditor(const ui::WidgetId& id, const std::string& propertyName)+ : PropertyEditor(id, propertyName) {++ if (showLabel_) {+ auto labelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_label"));+ labelWidget->setText(label_);+ labelWidget->setFontSize(12.0f);+ labelWidget_ = labelWidget.get();+ addChild(std::move(labelWidget));+ }++ auto checkboxWidget = makeUnique<ui::Checkbox>(ui::WidgetId(getId().path + "_checkbox"));+ checkboxWidget->setCheckboxSize(CHECKBOX_SIZE);+ checkbox_ = checkboxWidget.get();+ addChild(std::move(checkboxWidget));++ connections_.add(sink(checkbox_->onChanged).connect(+ [this](bool checked) { onCheckboxChanged(checked); }+ ));+}++// =============================================================================+// PropertyEditor Interface+// =============================================================================++void BoolEditor::setValue(const std::any& value) {+ try {+ bool newValue = std::any_cast<bool>(value);+ if (value_ == newValue) {+ return;+ }++ value_ = newValue;++ updatingFromValue_ = true;+ if (checkbox_) {+ checkbox_->setChecked(value_);+ }+ updatingFromValue_ = false;+ } catch (const std::bad_any_cast&) {+ }+}++std::any BoolEditor::getValue() const {+ return value_;+}++// =============================================================================+// Widget Interface+// =============================================================================++glm::vec2 BoolEditor::measure(f32 availableWidth, f32 availableHeight) {+ (void)availableWidth;+ (void)availableHeight;++ f32 width = 0.0f;+ f32 height = 20.0f;++ if (labelWidget_ && showLabel_) {+ width += LABEL_WIDTH + SPACING;+ }++ width += CHECKBOX_SIZE;++ return glm::vec2(width, height);+}++void BoolEditor::render(ui::UIBatchRenderer& renderer) {+ const ui::Rect& bounds = getBounds();+ f32 x = bounds.x;++ constexpr glm::vec4 labelColor{0.686f, 0.686f, 0.686f, 1.0f};++ if (labelWidget_ && showLabel_) {+ labelWidget_->setColor(labelColor);+ ui::Rect labelBounds{x, bounds.y, LABEL_WIDTH, bounds.height};+ labelWidget_->layout(labelBounds);+ labelWidget_->renderTree(renderer);+ x += LABEL_WIDTH + SPACING;+ }++ if (checkbox_) {+ f32 checkboxY = bounds.y + (bounds.height - CHECKBOX_SIZE) * 0.5f;+ ui::Rect checkboxBounds{x, checkboxY, CHECKBOX_SIZE, CHECKBOX_SIZE};+ checkbox_->layout(checkboxBounds);+ checkbox_->renderTree(renderer);+ }+}++// =============================================================================+// Protected Methods+// =============================================================================++Unique<Command> BoolEditor::createCommand(const std::any& oldValue,+ const std::any& newValue) {+ try {+ bool oldBool = std::any_cast<bool>(oldValue);+ bool newBool = std::any_cast<bool>(newValue);++ return makeUnique<LambdaCommand>(+ "Modify " + propertyName_,+ [this, newBool]() {+ setValue(newBool);+ return CommandResult::Success;+ },+ [this, oldBool]() {+ setValue(oldBool);+ }+ );+ } catch (const std::bad_any_cast&) {+ return nullptr;+ }+}++// =============================================================================+// Private Methods+// =============================================================================++void BoolEditor::onCheckboxChanged(bool checked) {+ if (updatingFromValue_) {+ return;+ }++ bool oldValue = value_;+ if (oldValue != checked) {+ value_ = checked;+ notifyValueChanged(oldValue, checked);+ }+}++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/BoolEditor.hpp b/src/esengine/editor/property/editors/BoolEditor.hppnew file mode 100644index 000000000..0470caa35--- /dev/null+++ b/src/esengine/editor/property/editors/BoolEditor.hpp@@ -0,0 +1,59 @@+/**+ * @file BoolEditor.hpp+ * @brief Property editor for boolean values+ * @details Uses a Checkbox widget for visual editing of bool properties.+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */+#pragma once++// =============================================================================+// Includes+// =============================================================================++#include "../PropertyEditor.hpp"+#include "../../../ui/widgets/Checkbox.hpp"+#include "../../../ui/widgets/Label.hpp"+#include "../../../events/Connection.hpp"++namespace esengine::editor {++// =============================================================================+// BoolEditor Class+// =============================================================================++class BoolEditor : public PropertyEditor {+public:+ explicit BoolEditor(const ui::WidgetId& id, const std::string& propertyName);+ ~BoolEditor() override = default;++ void setValue(const std::any& value) override;+ std::any getValue() const override;++ glm::vec2 measure(f32 availableWidth, f32 availableHeight) override;+ void render(ui::UIBatchRenderer& renderer) override;++protected:+ Unique<Command> createCommand(const std::any& oldValue,+ const std::any& newValue) override;++private:+ void onCheckboxChanged(bool checked);++ bool value_ = false;+ bool updatingFromValue_ = false;++ ui::Label* labelWidget_ = nullptr;+ ui::Checkbox* checkbox_ = nullptr;+ ConnectionHolder connections_;++ static constexpr f32 LABEL_WIDTH = 80.0f;+ static constexpr f32 CHECKBOX_SIZE = 16.0f;+ static constexpr f32 SPACING = 8.0f;+};++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/IntEditor.cpp b/src/esengine/editor/property/editors/IntEditor.cppnew file mode 100644index 000000000..87bb8c5f8--- /dev/null+++ b/src/esengine/editor/property/editors/IntEditor.cpp@@ -0,0 +1,257 @@+/**+ * @file IntEditor.cpp+ * @brief IntEditor implementation+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */++#include "IntEditor.hpp"+#include "../../command/PropertyCommand.hpp"+#include "../../../ui/UIContext.hpp"+#include "../../../ui/rendering/UIBatchRenderer.hpp"+#include "../../../events/Sink.hpp"++#include <sstream>++namespace esengine::editor {++// =============================================================================+// Constructor+// =============================================================================++IntEditor::IntEditor(const ui::WidgetId& id, const std::string& propertyName)+ : PropertyEditor(id, propertyName) {++ if (showLabel_) {+ auto labelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_label"));+ labelWidget->setText(label_);+ labelWidget->setFontSize(12.0f);+ labelWidget_ = labelWidget.get();+ addChild(std::move(labelWidget));+ }++ auto textField = makeUnique<ui::TextField>(ui::WidgetId(getId().path + "_text"));+ textField->setWidth(ui::SizeValue::px(TEXTFIELD_WIDTH));+ textField_ = textField.get();+ addChild(std::move(textField));++ connections_.add(sink(textField_->onTextChanged).connect(+ [this](const std::string& text) { onTextChanged(text); }+ ));++ updateTextFromValue();+}++// =============================================================================+// PropertyEditor Interface+// =============================================================================++void IntEditor::setValue(const std::any& value) {+ try {+ i32 newValue = std::any_cast<i32>(value);+ if (value_ == newValue) {+ return;+ }++ value_ = newValue;+ updateTextFromValue();+ updateSliderFromValue();+ } catch (const std::bad_any_cast&) {+ }+}++std::any IntEditor::getValue() const {+ return value_;+}++// =============================================================================+// Range Configuration+// =============================================================================++void IntEditor::setRange(i32 min, i32 max) {+ min_ = min;+ max_ = max;++ if (slider_) {+ slider_->setRange(static_cast<f32>(min_), static_cast<f32>(max_));+ }+}++void IntEditor::setShowSlider(bool show) {+ if (showSlider_ == show) {+ return;+ }++ showSlider_ = show;++ if (showSlider_ && !slider_) {+ auto sliderWidget = makeUnique<ui::Slider>(+ ui::WidgetId(getId().path + "_slider"),+ ui::SliderOrientation::Horizontal+ );+ sliderWidget->setRange(static_cast<f32>(min_), static_cast<f32>(max_));+ sliderWidget->setStep(1.0f);+ slider_ = sliderWidget.get();+ addChild(std::move(sliderWidget));++ connections_.add(sink(slider_->onValueChanged).connect(+ [this](f32 value) { onSliderChanged(value); }+ ));++ updateSliderFromValue();+ } else if (!showSlider_ && slider_) {+ removeChild(slider_);+ slider_ = nullptr;+ }++ invalidateLayout();+}++// =============================================================================+// Widget Interface+// =============================================================================++glm::vec2 IntEditor::measure(f32 availableWidth, f32 availableHeight) {+ (void)availableHeight;++ f32 width = 0.0f;+ f32 height = 20.0f;++ if (labelWidget_ && showLabel_) {+ width += LABEL_WIDTH + SPACING;+ }++ width += TEXTFIELD_WIDTH;++ if (slider_ && showSlider_) {+ width += SPACING;+ f32 sliderWidth = availableWidth - width;+ if (sliderWidth > 60.0f) {+ width += sliderWidth;+ }+ }++ return glm::vec2(width, height);+}++void IntEditor::render(ui::UIBatchRenderer& renderer) {+ const ui::Rect& bounds = getBounds();+ f32 x = bounds.x;++ constexpr glm::vec4 labelColor{0.686f, 0.686f, 0.686f, 1.0f};++ if (labelWidget_ && showLabel_) {+ labelWidget_->setColor(labelColor);+ ui::Rect labelBounds{x, bounds.y, LABEL_WIDTH, bounds.height};+ labelWidget_->layout(labelBounds);+ labelWidget_->renderTree(renderer);+ x += LABEL_WIDTH + SPACING;+ }++ if (textField_) {+ ui::Rect textBounds{x, bounds.y, TEXTFIELD_WIDTH, bounds.height};+ textField_->layout(textBounds);+ textField_->renderTree(renderer);+ x += TEXTFIELD_WIDTH;+ }++ if (slider_ && showSlider_) {+ x += SPACING;+ f32 sliderWidth = bounds.x + bounds.width - x;+ ui::Rect sliderBounds{x, bounds.y, sliderWidth, bounds.height};+ slider_->layout(sliderBounds);+ slider_->renderTree(renderer);+ }+}++// =============================================================================+// Protected Methods+// =============================================================================++Unique<Command> IntEditor::createCommand(const std::any& oldValue,+ const std::any& newValue) {+ try {+ i32 oldInt = std::any_cast<i32>(oldValue);+ i32 newInt = std::any_cast<i32>(newValue);++ return makeUnique<LambdaCommand>(+ "Modify " + propertyName_,+ [this, newInt]() {+ setValue(newInt);+ return CommandResult::Success;+ },+ [this, oldInt]() {+ setValue(oldInt);+ }+ );+ } catch (const std::bad_any_cast&) {+ return nullptr;+ }+}++// =============================================================================+// Private Methods+// =============================================================================++void IntEditor::onTextChanged(const std::string& text) {+ if (updatingFromSlider_) {+ return;+ }++ updatingFromText_ = true;++ try {+ i32 oldValue = value_;+ i32 newValue = std::stoi(text);++ if (oldValue != newValue) {+ value_ = newValue;+ updateSliderFromValue();+ notifyValueChanged(oldValue, newValue);+ }+ } catch (const std::invalid_argument&) {+ } catch (const std::out_of_range&) {+ }++ updatingFromText_ = false;+}++void IntEditor::onSliderChanged(f32 value) {+ if (updatingFromText_) {+ return;+ }++ updatingFromSlider_ = true;++ i32 oldValue = value_;+ i32 newValue = static_cast<i32>(value);+ if (oldValue != newValue) {+ value_ = newValue;+ updateTextFromValue();+ notifyValueChanged(oldValue, newValue);+ }++ updatingFromSlider_ = false;+}++void IntEditor::updateTextFromValue() {+ if (updatingFromText_ || !textField_) {+ return;+ }++ textField_->setText(std::to_string(value_));+}++void IntEditor::updateSliderFromValue() {+ if (updatingFromSlider_ || !slider_) {+ return;+ }++ slider_->setValue(static_cast<f32>(value_));+}++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/IntEditor.hpp b/src/esengine/editor/property/editors/IntEditor.hppnew file mode 100644index 000000000..e3cadb9b5--- /dev/null+++ b/src/esengine/editor/property/editors/IntEditor.hpp@@ -0,0 +1,76 @@+/**+ * @file IntEditor.hpp+ * @brief Property editor for integer values+ * @details Uses a TextField for input with optional slider.+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */+#pragma once++// =============================================================================+// Includes+// =============================================================================++#include "../PropertyEditor.hpp"+#include "../../../ui/widgets/TextField.hpp"+#include "../../../ui/widgets/Slider.hpp"+#include "../../../ui/widgets/Label.hpp"+#include "../../../events/Connection.hpp"++namespace esengine::editor {++// =============================================================================+// IntEditor Class+// =============================================================================++class IntEditor : public PropertyEditor {+public:+ explicit IntEditor(const ui::WidgetId& id, const std::string& propertyName);+ ~IntEditor() override = default;++ void setValue(const std::any& value) override;+ std::any getValue() const override;++ void setRange(i32 min, i32 max);+ i32 getMin() const { return min_; }+ i32 getMax() const { return max_; }++ void setShowSlider(bool show);+ bool getShowSlider() const { return showSlider_; }++ glm::vec2 measure(f32 availableWidth, f32 availableHeight) override;+ void render(ui::UIBatchRenderer& renderer) override;++protected:+ Unique<Command> createCommand(const std::any& oldValue,+ const std::any& newValue) override;++private:+ void onTextChanged(const std::string& text);+ void onSliderChanged(f32 value);+ void updateTextFromValue();+ void updateSliderFromValue();++ i32 value_ = 0;+ i32 min_ = 0;+ i32 max_ = 100;++ bool showSlider_ = false;+ bool updatingFromText_ = false;+ bool updatingFromSlider_ = false;++ ui::Label* labelWidget_ = nullptr;+ ui::TextField* textField_ = nullptr;+ ui::Slider* slider_ = nullptr;+ ConnectionHolder connections_;++ static constexpr f32 LABEL_WIDTH = 60.0f;+ static constexpr f32 TEXTFIELD_WIDTH = 60.0f;+ static constexpr f32 SPACING = 8.0f;+};++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/StringEditor.cpp b/src/esengine/editor/property/editors/StringEditor.cppnew file mode 100644index 000000000..e45bd48bc--- /dev/null+++ b/src/esengine/editor/property/editors/StringEditor.cpp@@ -0,0 +1,179 @@+/**+ * @file StringEditor.cpp+ * @brief StringEditor implementation+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */++#include "StringEditor.hpp"+#include "../../command/PropertyCommand.hpp"+#include "../../../ui/UIContext.hpp"+#include "../../../ui/rendering/UIBatchRenderer.hpp"+#include "../../../events/Sink.hpp"++namespace esengine::editor {++// =============================================================================+// Constructor+// =============================================================================++StringEditor::StringEditor(const ui::WidgetId& id, const std::string& propertyName)+ : PropertyEditor(id, propertyName) {++ if (showLabel_) {+ auto labelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_label"));+ labelWidget->setText(label_);+ labelWidget->setFontSize(12.0f);+ labelWidget_ = labelWidget.get();+ addChild(std::move(labelWidget));+ }++ auto textField = makeUnique<ui::TextField>(ui::WidgetId(getId().path + "_text"));+ textField_ = textField.get();+ addChild(std::move(textField));++ connections_.add(sink(textField_->onTextChanged).connect(+ [this](const std::string& text) { onTextChanged(text); }+ ));++ connections_.add(sink(textField_->onSubmit).connect(+ [this](const std::string& text) { onTextSubmit(text); }+ ));+}++// =============================================================================+// PropertyEditor Interface+// =============================================================================++void StringEditor::setValue(const std::any& value) {+ try {+ std::string newValue = std::any_cast<std::string>(value);+ if (value_ == newValue) {+ return;+ }++ value_ = newValue;+ pendingValue_ = newValue;+ hasUncommittedChanges_ = false;++ updatingFromValue_ = true;+ if (textField_) {+ textField_->setText(value_);+ }+ updatingFromValue_ = false;+ } catch (const std::bad_any_cast&) {+ }+}++std::any StringEditor::getValue() const {+ return value_;+}++void StringEditor::setPlaceholder(const std::string& placeholder) {+ if (textField_) {+ textField_->setPlaceholder(placeholder);+ }+}++// =============================================================================+// Widget Interface+// =============================================================================++glm::vec2 StringEditor::measure(f32 availableWidth, f32 availableHeight) {+ (void)availableHeight;++ f32 width = 0.0f;+ f32 height = 20.0f;++ if (labelWidget_ && showLabel_) {+ width += LABEL_WIDTH + SPACING;+ }++ f32 textFieldWidth = availableWidth - width;+ if (textFieldWidth < 80.0f) {+ textFieldWidth = 80.0f;+ }+ width += textFieldWidth;++ return glm::vec2(width, height);+}++void StringEditor::render(ui::UIBatchRenderer& renderer) {+ const ui::Rect& bounds = getBounds();+ f32 x = bounds.x;++ constexpr glm::vec4 labelColor{0.686f, 0.686f, 0.686f, 1.0f};++ if (labelWidget_ && showLabel_) {+ labelWidget_->setColor(labelColor);+ ui::Rect labelBounds{x, bounds.y, LABEL_WIDTH, bounds.height};+ labelWidget_->layout(labelBounds);+ labelWidget_->renderTree(renderer);+ x += LABEL_WIDTH + SPACING;+ }++ if (textField_) {+ f32 textFieldWidth = bounds.x + bounds.width - x;+ ui::Rect textBounds{x, bounds.y, textFieldWidth, bounds.height};+ textField_->layout(textBounds);+ textField_->renderTree(renderer);+ }+}++// =============================================================================+// Protected Methods+// =============================================================================++Unique<Command> StringEditor::createCommand(const std::any& oldValue,+ const std::any& newValue) {+ try {+ std::string oldStr = std::any_cast<std::string>(oldValue);+ std::string newStr = std::any_cast<std::string>(newValue);++ return makeUnique<LambdaCommand>(+ "Modify " + propertyName_,+ [this, newStr]() {+ setValue(newStr);+ return CommandResult::Success;+ },+ [this, oldStr]() {+ setValue(oldStr);+ }+ );+ } catch (const std::bad_any_cast&) {+ return nullptr;+ }+}++// =============================================================================+// Private Methods+// =============================================================================++void StringEditor::onTextChanged(const std::string& text) {+ if (updatingFromValue_) {+ return;+ }++ pendingValue_ = text;+ hasUncommittedChanges_ = (pendingValue_ != value_);+}++void StringEditor::onTextSubmit(const std::string& text) {+ if (updatingFromValue_) {+ return;+ }++ if (value_ != text) {+ std::string oldValue = value_;+ value_ = text;+ pendingValue_ = text;+ hasUncommittedChanges_ = false;+ notifyValueChanged(oldValue, value_);+ }+}++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/StringEditor.hpp b/src/esengine/editor/property/editors/StringEditor.hppnew file mode 100644index 000000000..afc1638fd--- /dev/null+++ b/src/esengine/editor/property/editors/StringEditor.hpp@@ -0,0 +1,63 @@+/**+ * @file StringEditor.hpp+ * @brief Property editor for string values+ * @details Uses a TextField for text input.+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */+#pragma once++// =============================================================================+// Includes+// =============================================================================++#include "../PropertyEditor.hpp"+#include "../../../ui/widgets/TextField.hpp"+#include "../../../ui/widgets/Label.hpp"+#include "../../../events/Connection.hpp"++namespace esengine::editor {++// =============================================================================+// StringEditor Class+// =============================================================================++class StringEditor : public PropertyEditor {+public:+ explicit StringEditor(const ui::WidgetId& id, const std::string& propertyName);+ ~StringEditor() override = default;++ void setValue(const std::any& value) override;+ std::any getValue() const override;++ void setPlaceholder(const std::string& placeholder);++ glm::vec2 measure(f32 availableWidth, f32 availableHeight) override;+ void render(ui::UIBatchRenderer& renderer) override;++protected:+ Unique<Command> createCommand(const std::any& oldValue,+ const std::any& newValue) override;++private:+ void onTextChanged(const std::string& text);+ void onTextSubmit(const std::string& text);++ std::string value_;+ std::string pendingValue_;+ bool updatingFromValue_ = false;+ bool hasUncommittedChanges_ = false;++ ui::Label* labelWidget_ = nullptr;+ ui::TextField* textField_ = nullptr;+ ConnectionHolder connections_;++ static constexpr f32 LABEL_WIDTH = 60.0f;+ static constexpr f32 SPACING = 8.0f;+};++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/Vector2Editor.cpp b/src/esengine/editor/property/editors/Vector2Editor.cppnew file mode 100644index 000000000..6eec734ef--- /dev/null+++ b/src/esengine/editor/property/editors/Vector2Editor.cpp@@ -0,0 +1,204 @@+/**+ * @file Vector2Editor.cpp+ * @brief Vector2Editor implementation+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */++#include "Vector2Editor.hpp"+#include "../../command/PropertyCommand.hpp"+#include "../../../ui/UIContext.hpp"+#include "../../../ui/rendering/UIBatchRenderer.hpp"+#include "../../../events/Sink.hpp"++namespace esengine::editor {++// =============================================================================+// Constructor+// =============================================================================++Vector2Editor::Vector2Editor(const ui::WidgetId& id, const std::string& propertyName)+ : PropertyEditor(id, propertyName) {++ if (showLabel_) {+ auto mainLabelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_label"));+ mainLabelWidget->setText(label_);+ mainLabelWidget->setFontSize(12.0f);+ mainLabel_ = mainLabelWidget.get();+ addChild(std::move(mainLabelWidget));+ }++ auto xLabelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_x_label"));+ xLabelWidget->setText("X");+ xLabelWidget->setFontSize(12.0f);+ xLabel_ = xLabelWidget.get();+ addChild(std::move(xLabelWidget));++ auto xEditorWidget = makeUnique<FloatEditor>(ui::WidgetId(getId().path + "_x"), "x");+ xEditorWidget->setShowLabel(false);+ xEditor_ = xEditorWidget.get();+ addChild(std::move(xEditorWidget));++ auto yLabelWidget = makeUnique<ui::Label>(ui::WidgetId(getId().path + "_y_label"));+ yLabelWidget->setText("Y");+ yLabelWidget->setFontSize(12.0f);+ yLabel_ = yLabelWidget.get();+ addChild(std::move(yLabelWidget));++ auto yEditorWidget = makeUnique<FloatEditor>(ui::WidgetId(getId().path + "_y"), "y");+ yEditorWidget->setShowLabel(false);+ yEditor_ = yEditorWidget.get();+ addChild(std::move(yEditorWidget));++ connections_.add(sink(xEditor_->onValueChanged).connect(+ [this](const std::any&) { onComponentChanged(); }+ ));+ connections_.add(sink(yEditor_->onValueChanged).connect(+ [this](const std::any&) { onComponentChanged(); }+ ));+}++// =============================================================================+// PropertyEditor Interface+// =============================================================================++void Vector2Editor::setValue(const std::any& value) {+ try {+ glm::vec2 newValue = std::any_cast<glm::vec2>(value);+ if (value_ == newValue) {+ return;+ }++ value_ = newValue;++ updatingFromValue_ = true;+ xEditor_->setValue(value_.x);+ yEditor_->setValue(value_.y);+ updatingFromValue_ = false;+ } catch (const std::bad_any_cast&) {+ }+}++std::any Vector2Editor::getValue() const {+ return value_;+}++// =============================================================================+// Widget Interface+// =============================================================================++glm::vec2 Vector2Editor::measure(f32 availableWidth, f32 availableHeight) {+ (void)availableWidth;+ (void)availableHeight;++ f32 width = 0.0f;+ f32 height = 20.0f;++ if (mainLabel_ && showLabel_) {+ width += MAIN_LABEL_WIDTH + SPACING;+ }++ width += COMPONENT_LABEL_WIDTH + SPACING + FLOAT_EDITOR_WIDTH + SPACING;+ width += COMPONENT_LABEL_WIDTH + SPACING + FLOAT_EDITOR_WIDTH;++ return glm::vec2(width, height);+}++void Vector2Editor::render(ui::UIBatchRenderer& renderer) {+ const ui::Rect& bounds = getBounds();+ f32 x = bounds.x;++ constexpr glm::vec4 labelColor{0.686f, 0.686f, 0.686f, 1.0f};+ constexpr glm::vec4 xColor{0.9f, 0.4f, 0.4f, 1.0f};+ constexpr glm::vec4 yColor{0.4f, 0.9f, 0.4f, 1.0f};++ if (mainLabel_ && showLabel_) {+ mainLabel_->setColor(labelColor);+ ui::Rect labelBounds{x, bounds.y, MAIN_LABEL_WIDTH, bounds.height};+ mainLabel_->layout(labelBounds);+ mainLabel_->renderTree(renderer);+ x += MAIN_LABEL_WIDTH + SPACING;+ }++ if (xLabel_) {+ xLabel_->setColor(xColor);+ ui::Rect labelBounds{x, bounds.y, COMPONENT_LABEL_WIDTH, bounds.height};+ xLabel_->layout(labelBounds);+ xLabel_->renderTree(renderer);+ x += COMPONENT_LABEL_WIDTH + SPACING;+ }++ if (xEditor_) {+ ui::Rect editorBounds{x, bounds.y, FLOAT_EDITOR_WIDTH, bounds.height};+ xEditor_->layout(editorBounds);+ xEditor_->renderTree(renderer);+ x += FLOAT_EDITOR_WIDTH + SPACING;+ }++ if (yLabel_) {+ yLabel_->setColor(yColor);+ ui::Rect labelBounds{x, bounds.y, COMPONENT_LABEL_WIDTH, bounds.height};+ yLabel_->layout(labelBounds);+ yLabel_->renderTree(renderer);+ x += COMPONENT_LABEL_WIDTH + SPACING;+ }++ if (yEditor_) {+ ui::Rect editorBounds{x, bounds.y, FLOAT_EDITOR_WIDTH, bounds.height};+ yEditor_->layout(editorBounds);+ yEditor_->renderTree(renderer);+ }+}++// =============================================================================+// Protected Methods+// =============================================================================++Unique<Command> Vector2Editor::createCommand(const std::any& oldValue,+ const std::any& newValue) {+ try {+ glm::vec2 oldVec = std::any_cast<glm::vec2>(oldValue);+ glm::vec2 newVec = std::any_cast<glm::vec2>(newValue);++ return makeUnique<LambdaCommand>(+ "Modify " + propertyName_,+ [this, newVec]() {+ setValue(newVec);+ return CommandResult::Success;+ },+ [this, oldVec]() {+ setValue(oldVec);+ }+ );+ } catch (const std::bad_any_cast&) {+ return nullptr;+ }+}++// =============================================================================+// Private Methods+// =============================================================================++void Vector2Editor::onComponentChanged() {+ if (updatingFromValue_) {+ return;+ }++ glm::vec2 oldValue = value_;++ try {+ value_.x = std::any_cast<f32>(xEditor_->getValue());+ value_.y = std::any_cast<f32>(yEditor_->getValue());++ if (oldValue != value_) {+ notifyValueChanged(oldValue, value_);+ }+ } catch (const std::bad_any_cast&) {+ }+}++} // namespace esengine::editordiff --git a/src/esengine/editor/property/editors/Vector2Editor.hpp b/src/esengine/editor/property/editors/Vector2Editor.hppnew file mode 100644index 000000000..911a581f0--- /dev/null+++ b/src/esengine/editor/property/editors/Vector2Editor.hpp@@ -0,0 +1,66 @@+/**+ * @file Vector2Editor.hpp+ * @brief Property editor for 2D vector values+ * @details Combines two FloatEditors (X, Y) for editing glm::vec2.+ *+ * @author ESEngine Team+ * @date 2026+ *+ * @copyright Copyright (c) 2026 ESEngine Team+ * Licensed under the MIT License.+ */+#pragma once++// =============================================================================+// Includes+// =============================================================================++#include "../PropertyEditor.hpp"+#include "FloatEditor.hpp"+#include "../../../ui/widgets/Label.hpp"+#include "../../../events/Connection.hpp"++#include <glm/glm.hpp>++namespace esengine::editor {++// =============================================================================+// Vector2Editor Class+// =============================================================================++class Vector2Editor : public PropertyEditor {+public:+ explicit Vector2Editor(const ui::WidgetId& id, const std::string& propertyName);+ ~Vector2Editor() override = default;++ void setValue(const std::any& value) override;+ std::any getValue() const override;++ glm::vec2 measure(f32 availableWidth, f32 availableHeight) override;+ void render(ui::UIBatchRenderer& renderer) override;++protected:+ Unique<Command> createCommand(const std::any& oldValue,+ const std::any& newValue) override;++private:+ void onComponentChanged();++ glm::vec2 value_{0.0f};+ bool updatingFromValue_ = false;++ ui::Label* mainLabel_ = nullptr;+ ui::Label* xLabel_ = nullptr;+ ui::Label* yLabel_ = nullptr;++ FloatEditor* xEditor_ = nullptr;+ FloatEditor* yEditor_ = nullptr;+ ConnectionHolder connections_;++ static constexpr f32 MAIN_LABEL_WIDTH = 60.0f;+ static constexpr f32 COMPONENT_LABEL_WIDTH = 12.0f;+ static constexpr f32 FLOAT_EDITOR_WIDTH = 60.0f;+ static constexpr f32 SPACING = 4.0f;+};++} // namespace esengine::editor