|
@@ -29,6 +29,7 @@
|
|
/**************************************************************************/
|
|
/**************************************************************************/
|
|
|
|
|
|
#include "editor_inspector.h"
|
|
#include "editor_inspector.h"
|
|
|
|
+#include "editor_inspector.compat.inc"
|
|
|
|
|
|
#include "core/os/keyboard.h"
|
|
#include "core/os/keyboard.h"
|
|
#include "editor/doc_tools.h"
|
|
#include "editor/doc_tools.h"
|
|
@@ -1128,11 +1129,12 @@ void EditorInspectorPlugin::add_custom_control(Control *control) {
|
|
added_editors.push_back(ae);
|
|
added_editors.push_back(ae);
|
|
}
|
|
}
|
|
|
|
|
|
-void EditorInspectorPlugin::add_property_editor(const String &p_for_property, Control *p_prop, bool p_add_to_end) {
|
|
|
|
|
|
+void EditorInspectorPlugin::add_property_editor(const String &p_for_property, Control *p_prop, bool p_add_to_end, const String &p_label) {
|
|
AddedEditor ae;
|
|
AddedEditor ae;
|
|
ae.properties.push_back(p_for_property);
|
|
ae.properties.push_back(p_for_property);
|
|
ae.property_editor = p_prop;
|
|
ae.property_editor = p_prop;
|
|
ae.add_to_end = p_add_to_end;
|
|
ae.add_to_end = p_add_to_end;
|
|
|
|
+ ae.label = p_label;
|
|
added_editors.push_back(ae);
|
|
added_editors.push_back(ae);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1174,7 +1176,7 @@ void EditorInspectorPlugin::parse_end(Object *p_object) {
|
|
|
|
|
|
void EditorInspectorPlugin::_bind_methods() {
|
|
void EditorInspectorPlugin::_bind_methods() {
|
|
ClassDB::bind_method(D_METHOD("add_custom_control", "control"), &EditorInspectorPlugin::add_custom_control);
|
|
ClassDB::bind_method(D_METHOD("add_custom_control", "control"), &EditorInspectorPlugin::add_custom_control);
|
|
- ClassDB::bind_method(D_METHOD("add_property_editor", "property", "editor", "add_to_end"), &EditorInspectorPlugin::add_property_editor, DEFVAL(false));
|
|
|
|
|
|
+ ClassDB::bind_method(D_METHOD("add_property_editor", "property", "editor", "add_to_end", "label"), &EditorInspectorPlugin::add_property_editor, DEFVAL(false), DEFVAL(String()));
|
|
ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties);
|
|
ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties);
|
|
|
|
|
|
GDVIRTUAL_BIND(_can_handle, "object")
|
|
GDVIRTUAL_BIND(_can_handle, "object")
|