diff options
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r-- | editor/property_editor.cpp | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 86b6e4c6a5..3906827027 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -51,6 +51,7 @@ #include "editor/editor_settings.h" #include "editor/filesystem_dock.h" #include "editor/multi_node_edit.h" +#include "editor/plugins/editor_resource_conversion_plugin.h" #include "editor/property_selector.h" #include "editor/scene_tree_dock.h" #include "scene/gui/label.h" @@ -59,39 +60,6 @@ #include "scene/resources/packed_scene.h" #include "scene/scene_string_names.h" -void EditorResourceConversionPlugin::_bind_methods() { - GDVIRTUAL_BIND(_converts_to); - GDVIRTUAL_BIND(_handles, "resource"); - GDVIRTUAL_BIND(_convert, "resource"); -} - -String EditorResourceConversionPlugin::converts_to() const { - String ret; - if (GDVIRTUAL_CALL(_converts_to, ret)) { - return ret; - } - - return ""; -} - -bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const { - bool ret; - if (GDVIRTUAL_CALL(_handles, p_resource, ret)) { - return ret; - } - - return false; -} - -Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const { - Ref<Resource> ret; - if (GDVIRTUAL_CALL(_convert, p_resource, ret)) { - return ret; - } - - return Ref<Resource>(); -} - void CustomPropertyEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_WM_CLOSE_REQUEST: { @@ -477,8 +445,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: type_button->get_popup()->add_item(TTR("Ease Out"), EASING_EASE_OUT); if (hint_text != "attenuation") { type_button->get_popup()->add_item(TTR("Zero"), EASING_ZERO); - type_button->get_popup()->add_item(TTR("Easing In-Out"), EASING_IN_OUT); - type_button->get_popup()->add_item(TTR("Easing Out-In"), EASING_OUT_IN); + type_button->get_popup()->add_item(TTR("Ease In-Out"), EASING_IN_OUT); + type_button->get_popup()->add_item(TTR("Ease Out-In"), EASING_OUT_IN); } type_button->show(); @@ -827,7 +795,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: value_vbox->add_child(color_picker); color_picker->hide(); color_picker->connect("color_changed", callable_mp(this, &CustomPropertyEditor::_color_changed)); - color_picker->connect("show", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(color_picker)); + color_picker->connect("show", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(color_picker)); } color_picker->show(); @@ -1813,7 +1781,7 @@ CustomPropertyEditor::CustomPropertyEditor() { checks20[i]->set_focus_mode(Control::FOCUS_NONE); checks20gc->add_child(checks20[i]); checks20[i]->hide(); - checks20[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), make_binds(i)); + checks20[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed).bind(i)); checks20[i]->set_tooltip(vformat(TTR("Bit %d, val %d."), i, 1 << i)); } @@ -1890,9 +1858,7 @@ CustomPropertyEditor::CustomPropertyEditor() { action_buttons[i] = memnew(Button); action_buttons[i]->hide(); action_hboxes->add_child(action_buttons[i]); - Vector<Variant> binds; - binds.push_back(i); - action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds); + action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed).bind(i)); } create_dialog = nullptr; |