[Scene] Add SceneStringNames::text/value_changed

This commit is contained in:
A Thousand Ships
2024-05-14 11:42:00 +02:00
parent ca18a06ecb
commit fbb879debd
90 changed files with 238 additions and 232 deletions

View File

@@ -2479,7 +2479,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
new_size_spin_box = memnew(SpinBox);
new_size_spin_box->set_max(16384);
new_size_spin_box->connect("value_changed", callable_mp(this, &EditorInspectorArray::_new_size_spin_box_value_changed));
new_size_spin_box->connect(SceneStringName(value_changed), callable_mp(this, &EditorInspectorArray::_new_size_spin_box_value_changed));
new_size_spin_box->get_line_edit()->connect("text_submitted", callable_mp(this, &EditorInspectorArray::_new_size_spin_box_text_submitted));
new_size_spin_box->set_editable(!read_only);
resize_dialog_vbox->add_margin_child(TTRC("New Size:"), new_size_spin_box);
@@ -3667,7 +3667,7 @@ void EditorInspector::set_use_filter(bool p_use) {
void EditorInspector::register_text_enter(Node *p_line_edit) {
search_box = Object::cast_to<LineEdit>(p_line_edit);
if (search_box) {
search_box->connect("text_changed", callable_mp(this, &EditorInspector::_filter_changed));
search_box->connect(SceneStringName(text_changed), callable_mp(this, &EditorInspector::_filter_changed));
}
}
@@ -4300,7 +4300,7 @@ void EditorInspector::_show_add_meta_dialog() {
validation_panel->set_update_callback(callable_mp(this, &EditorInspector::_check_meta_name));
validation_panel->set_accept_button(add_meta_dialog->get_ok_button());
add_meta_name->connect("text_changed", callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
add_meta_name->connect(SceneStringName(text_changed), callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
}
Node *node = Object::cast_to<Node>(object);
@@ -4349,7 +4349,7 @@ EditorInspector::EditorInspector() {
property_focusable = -1;
property_clipboard = Variant();
get_v_scroll_bar()->connect("value_changed", callable_mp(this, &EditorInspector::_vscroll_changed));
get_v_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &EditorInspector::_vscroll_changed));
update_scroll_request = -1;
if (EditorSettings::get_singleton()) {
refresh_countdown = float(EDITOR_GET("docks/property_editor/auto_refresh_interval"));