Use Core/Scene stringnames consistently

This commit is contained in:
kobewi 2024-05-13 16:56:03 +02:00
parent de196227e1
commit 413c11357d
214 changed files with 650 additions and 765 deletions

View file

@ -31,7 +31,6 @@
#include "project_settings.h"
#include "core/core_bind.h" // For Compression enum.
#include "core/core_string_names.h"
#include "core/input/input_map.h"
#include "core/io/config_file.h"
#include "core/io/dir_access.h"

View file

@ -30,7 +30,6 @@
#include "marshalls.h"
#include "core/core_string_names.h"
#include "core/io/resource_loader.h"
#include "core/object/ref_counted.h"
#include "core/object/script_language.h"

View file

@ -30,7 +30,6 @@
#include "packed_data_container.h"
#include "core/core_string_names.h"
#include "core/io/marshalls.h"
Variant PackedDataContainer::getvar(const Variant &p_key, bool *r_valid) const {

View file

@ -30,7 +30,6 @@
#include "resource.h"
#include "core/core_string_names.h"
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
#include "core/math/math_funcs.h"

View file

@ -31,7 +31,6 @@
#include "class_db.h"
#include "core/config/engine.h"
#include "core/core_string_names.h"
#include "core/io/resource_loader.h"
#include "core/object/script_language.h"
#include "core/os/mutex.h"

View file

@ -31,7 +31,6 @@
#include "message_queue.h"
#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"

View file

@ -31,7 +31,6 @@
#include "object.h"
#include "object.compat.inc"
#include "core/core_string_names.h"
#include "core/extension/gdextension_manager.h"
#include "core/io/resource.h"
#include "core/object/class_db.h"

View file

@ -31,7 +31,6 @@
#include "script_language.h"
#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
#include "core/io/resource_loader.h"

View file

@ -33,7 +33,6 @@
#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/core_bind.h"
#include "core/core_string_names.h"
#include "core/crypto/aes_context.h"
#include "core/crypto/crypto.h"
#include "core/crypto/hashing_context.h"

View file

@ -30,7 +30,6 @@
#include "variant.h"
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/io/json.h"
#include "core/io/marshalls.h"

View file

@ -31,6 +31,7 @@
#ifndef VARIANT_H
#define VARIANT_H
#include "core/core_string_names.h"
#include "core/input/input_enums.h"
#include "core/io/ip_address.h"
#include "core/math/aabb.h"

View file

@ -30,7 +30,6 @@
#include "variant.h"
#include "core/core_string_names.h"
#include "core/crypto/crypto_core.h"
#include "core/debugger/engine_debugger.h"
#include "core/io/compression.h"

View file

@ -33,7 +33,6 @@
#include "variant.h"
#include "core/core_string_names.h"
#include "core/crypto/crypto_core.h"
#include "core/debugger/engine_debugger.h"
#include "core/io/compression.h"

View file

@ -33,7 +33,6 @@
#include "variant.h"
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/object/class_db.h"

View file

@ -33,7 +33,6 @@
#include "variant.h"
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/object/class_db.h"
#include "core/templates/local_vector.h"

View file

@ -30,7 +30,6 @@
#include "variant_utility.h"
#include "core/core_string_names.h"
#include "core/io/marshalls.h"
#include "core/object/ref_counted.h"
#include "core/os/os.h"

View file

@ -38,7 +38,6 @@
#include "scene/gui/check_button.h"
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
#include "scene/scene_string_names.h"
static bool _is_action_name_valid(const String &p_name) {
const char32_t *cstr = p_name.get_data();

View file

@ -1939,7 +1939,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
play_position->connect(SceneStringName(draw), callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
set_clip_contents(true);

View file

@ -55,7 +55,6 @@
#include "scene/gui/texture_rect.h"
#include "scene/gui/view_panner.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
void AnimationTrackKeyEdit::_bind_methods() {
@ -1896,7 +1895,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
play_position->connect("draw", callable_mp(this, &AnimationTimelineEdit::_play_position_draw));
play_position->connect(SceneStringName(draw), callable_mp(this, &AnimationTimelineEdit::_play_position_draw));
add_track = memnew(MenuButton);
add_track->set_position(Vector2(0, 0));
@ -2962,7 +2961,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
}
path->set_text(animation->track_get_path(track));
Vector2 theme_ofs = path->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->get_offset();
Vector2 theme_ofs = path->get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit"))->get_offset();
path_popup->set_position(get_screen_position() + path_rect.position - theme_ofs);
path_popup->set_size(path_rect.size);
path_popup->popup();
@ -3363,7 +3362,7 @@ AnimationTrackEdit::AnimationTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
play_position->connect("draw", callable_mp(this, &AnimationTrackEdit::_play_position_draw));
play_position->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
set_mouse_filter(MOUSE_FILTER_PASS); // Scroll has to work too for selection.
}
@ -3586,13 +3585,13 @@ void AnimationTrackEditor::_root_removed() {
void AnimationTrackEditor::set_root(Node *p_root) {
if (root) {
root->disconnect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed));
root->disconnect(SceneStringName(tree_exiting), callable_mp(this, &AnimationTrackEditor::_root_removed));
}
root = p_root;
if (root) {
root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), CONNECT_ONE_SHOT);
root->connect(SceneStringName(tree_exiting), callable_mp(this, &AnimationTrackEditor::_root_removed), CONNECT_ONE_SHOT);
}
_update_tracks();
@ -7195,8 +7194,8 @@ AnimationTrackEditor::AnimationTrackEditor() {
scroll->remove_child(sb);
timeline_scroll->add_child(sb); // Move here so timeline and tracks are always aligned.
scroll->set_focus_mode(FOCUS_CLICK);
scroll->connect("gui_input", callable_mp(this, &AnimationTrackEditor::_scroll_input));
scroll->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
scroll->connect(SceneStringName(gui_input), callable_mp(this, &AnimationTrackEditor::_scroll_input));
scroll->connect(SceneStringName(focus_exited), callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
bezier_edit = memnew(AnimationBezierTrackEdit);
timeline_vbox->add_child(bezier_edit);
@ -7373,7 +7372,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
pick_track->set_title(TTR("Pick a node to animate:"));
pick_track->connect("selected", callable_mp(this, &AnimationTrackEditor::_new_track_node_selected));
pick_track->get_filter_line_edit()->connect("text_changed", callable_mp(this, &AnimationTrackEditor::_pick_track_filter_text_changed));
pick_track->get_filter_line_edit()->connect("gui_input", callable_mp(this, &AnimationTrackEditor::_pick_track_filter_input));
pick_track->get_filter_line_edit()->connect(SceneStringName(gui_input), callable_mp(this, &AnimationTrackEditor::_pick_track_filter_input));
prop_selector = memnew(PropertySelector);
add_child(prop_selector);
@ -7406,7 +7405,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
box_selection->set_as_top_level(true);
box_selection->set_mouse_filter(MOUSE_FILTER_IGNORE);
box_selection->hide();
box_selection->connect("draw", callable_mp(this, &AnimationTrackEditor::_box_selection_draw));
box_selection->connect(SceneStringName(draw), callable_mp(this, &AnimationTrackEditor::_box_selection_draw));
// Default Plugins.

View file

@ -709,7 +709,7 @@ FindReplaceBar::FindReplaceBar() {
search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
search_text->connect("text_changed", callable_mp(this, &FindReplaceBar::_search_text_changed));
search_text->connect("text_submitted", callable_mp(this, &FindReplaceBar::_search_text_submitted));
search_text->connect("focus_exited", callable_mp(this, &FindReplaceBar::_focus_lost));
search_text->connect(SceneStringName(focus_exited), callable_mp(this, &FindReplaceBar::_focus_lost));
matches_label = memnew(Label);
hbc_button_search->add_child(matches_label);
@ -748,7 +748,7 @@ FindReplaceBar::FindReplaceBar() {
replace_text->set_tooltip_text(TTR("Replace"));
replace_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
replace_text->connect("text_submitted", callable_mp(this, &FindReplaceBar::_replace_text_submitted));
replace_text->connect("focus_exited", callable_mp(this, &FindReplaceBar::_focus_lost));
replace_text->connect(SceneStringName(focus_exited), callable_mp(this, &FindReplaceBar::_focus_lost));
replace = memnew(Button);
hbc_button_replace->add_child(replace);
@ -1727,7 +1727,7 @@ CodeTextEditor::CodeTextEditor() {
scroll->add_child(error);
error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
error->set_mouse_filter(MOUSE_FILTER_STOP);
error->connect("gui_input", callable_mp(this, &CodeTextEditor::_error_pressed));
error->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_error_pressed));
// Errors
error_button = memnew(Button);
@ -1788,7 +1788,7 @@ CodeTextEditor::CodeTextEditor() {
indentation_txt->set_tooltip_text(TTR("Indentation"));
indentation_txt->set_mouse_filter(MOUSE_FILTER_STOP);
text_editor->connect("gui_input", callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
text_editor->connect("caret_changed", callable_mp(this, &CodeTextEditor::_line_col_changed));
text_editor->connect("text_changed", callable_mp(this, &CodeTextEditor::_text_changed));
text_editor->connect("code_completion_requested", callable_mp(this, &CodeTextEditor::_complete_request));

View file

@ -1622,7 +1622,7 @@ ConnectionsDock::ConnectionsDock() {
connect_dialog->connect("connected", callable_mp(this, &ConnectionsDock::_make_or_edit_connection));
tree->connect("item_selected", callable_mp(this, &ConnectionsDock::_tree_item_selected));
tree->connect("item_activated", callable_mp(this, &ConnectionsDock::_tree_item_activated));
tree->connect("gui_input", callable_mp(this, &ConnectionsDock::_tree_gui_input));
tree->connect(SceneStringName(gui_input), callable_mp(this, &ConnectionsDock::_tree_gui_input));
add_theme_constant_override("separation", 3 * EDSCALE);
}

View file

@ -807,7 +807,7 @@ CreateDialog::CreateDialog() {
search_box->set_clear_button_enabled(true);
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_box->connect("text_changed", callable_mp(this, &CreateDialog::_text_changed));
search_box->connect("gui_input", callable_mp(this, &CreateDialog::_sbox_input));
search_box->connect(SceneStringName(gui_input), callable_mp(this, &CreateDialog::_sbox_input));
HBoxContainer *search_hb = memnew(HBoxContainer);
search_hb->add_child(search_box);

View file

@ -111,7 +111,7 @@ void EditorPerformanceProfiler::_monitor_draw() {
info_message->hide();
Ref<StyleBox> graph_style_box = get_theme_stylebox(SNAME("normal"), SNAME("TextEdit"));
Ref<StyleBox> graph_style_box = get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit"));
Ref<Font> graph_font = get_theme_font(SNAME("font"), SNAME("TextEdit"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("TextEdit"));
@ -276,7 +276,7 @@ void EditorPerformanceProfiler::_marker_input(const Ref<InputEvent> &p_event) {
} else {
marker_key = "";
}
Ref<StyleBox> graph_style_box = get_theme_stylebox(SNAME("normal"), SNAME("TextEdit"));
Ref<StyleBox> graph_style_box = get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit"));
rect.position += graph_style_box->get_offset();
rect.size -= graph_style_box->get_minimum_size();
Vector2 point = mb->get_position() - rect.position;
@ -397,8 +397,8 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() {
monitor_draw = memnew(Control);
monitor_draw->set_clip_contents(true);
monitor_draw->connect("draw", callable_mp(this, &EditorPerformanceProfiler::_monitor_draw));
monitor_draw->connect("gui_input", callable_mp(this, &EditorPerformanceProfiler::_marker_input));
monitor_draw->connect(SceneStringName(draw), callable_mp(this, &EditorPerformanceProfiler::_monitor_draw));
monitor_draw->connect(SceneStringName(gui_input), callable_mp(this, &EditorPerformanceProfiler::_marker_input));
add_child(monitor_draw);
info_message = memnew(Label);

View file

@ -694,9 +694,9 @@ EditorProfiler::EditorProfiler() {
graph = memnew(TextureRect);
graph->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
graph->connect("draw", callable_mp(this, &EditorProfiler::_graph_tex_draw));
graph->connect("gui_input", callable_mp(this, &EditorProfiler::_graph_tex_input));
graph->connect("mouse_exited", callable_mp(this, &EditorProfiler::_graph_tex_mouse_exit));
graph->connect(SceneStringName(draw), callable_mp(this, &EditorProfiler::_graph_tex_draw));
graph->connect(SceneStringName(gui_input), callable_mp(this, &EditorProfiler::_graph_tex_input));
graph->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorProfiler::_graph_tex_mouse_exit));
h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL);

View file

@ -802,9 +802,9 @@ EditorVisualProfiler::EditorVisualProfiler() {
graph = memnew(TextureRect);
graph->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
graph->connect("mouse_exited", callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit));
graph->connect(SceneStringName(draw), callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
graph->connect(SceneStringName(gui_input), callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
graph->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit));
h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL);

View file

@ -52,13 +52,13 @@ void EditorAbout::_notification(int p_what) {
_tpl_text->begin_bulk_theme_override();
_tpl_text->add_theme_font_override("normal_font", font);
_tpl_text->add_theme_font_size_override("normal_font_size", font_size);
_tpl_text->add_theme_constant_override("line_separation", 4 * EDSCALE);
_tpl_text->add_theme_constant_override(SceneStringName(line_separation), 4 * EDSCALE);
_tpl_text->end_bulk_theme_override();
license_text_label->begin_bulk_theme_override();
license_text_label->add_theme_font_override("normal_font", font);
license_text_label->add_theme_font_size_override("normal_font_size", font_size);
license_text_label->add_theme_constant_override("line_separation", 4 * EDSCALE);
license_text_label->add_theme_constant_override(SceneStringName(line_separation), 4 * EDSCALE);
license_text_label->end_bulk_theme_override();
_logo->set_texture(get_editor_theme_icon(SNAME("Logo")));
@ -130,8 +130,8 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St
il->set_mouse_filter(Control::MOUSE_FILTER_PASS);
il->connect("item_activated", callable_mp(this, &EditorAbout::_item_with_website_selected).bind(il));
il->connect("resized", callable_mp(this, &EditorAbout::_item_list_resized).bind(il));
il->connect("focus_exited", callable_mp(il, &ItemList::deselect_all));
il->connect(SceneStringName(resized), callable_mp(this, &EditorAbout::_item_list_resized).bind(il));
il->connect(SceneStringName(focus_exited), callable_mp(il, &ItemList::deselect_all));
il->add_theme_style_override("focus", empty_stylebox);
il->add_theme_style_override("selected", empty_stylebox);

View file

@ -805,7 +805,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
track_name = memnew(LineEdit);
track_name->connect("text_submitted", callable_mp(this, &EditorAudioBus::_name_changed));
track_name->connect("focus_exited", callable_mp(this, &EditorAudioBus::_name_focus_exit));
track_name->connect(SceneStringName(focus_exited), callable_mp(this, &EditorAudioBus::_name_focus_exit));
vb->add_child(track_name);
HBoxContainer *hbc = memnew(HBoxContainer);
@ -926,14 +926,14 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
vb->add_child(effects);
effects->connect("item_edited", callable_mp(this, &EditorAudioBus::_effect_edited));
effects->connect("cell_selected", callable_mp(this, &EditorAudioBus::_effect_selected));
effects->connect("focus_exited", callable_mp(effects, &Tree::deselect_all));
effects->connect(SceneStringName(focus_exited), callable_mp(effects, &Tree::deselect_all));
effects->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
SET_DRAG_FORWARDING_GCD(effects, EditorAudioBus);
effects->connect("item_mouse_selected", callable_mp(this, &EditorAudioBus::_effect_rmb));
effects->set_allow_rmb_select(true);
effects->set_focus_mode(FOCUS_CLICK);
effects->set_allow_reselect(true);
effects->connect("gui_input", callable_mp(this, &EditorAudioBus::_effects_gui_input));
effects->connect(SceneStringName(gui_input), callable_mp(this, &EditorAudioBus::_effects_gui_input));
send = memnew(OptionButton);
send->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
@ -982,7 +982,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
void EditorAudioBusDrop::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_DRAW: {
draw_style_box(get_theme_stylebox(SNAME("normal"), SNAME("Button")), Rect2(Vector2(), get_size()));
draw_style_box(get_theme_stylebox(CoreStringName(normal), SNAME("Button")), Rect2(Vector2(), get_size()));
if (hovering_drop) {
Color accent = get_theme_color(SNAME("accent_color"), EditorStringName(Editor));

View file

@ -236,8 +236,8 @@ void EditorAutoloadSettings::_autoload_edited() {
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", selected_autoload, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", name);
undo_redo->add_do_method(this, "call_deferred", "update_autoload");
undo_redo->add_undo_method(this, "call_deferred", "update_autoload");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_autoload");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_autoload");
undo_redo->add_do_method(this, "emit_signal", autoload_changed);
undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
@ -271,8 +271,8 @@ void EditorAutoloadSettings::_autoload_edited() {
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", base, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", base, order);
undo_redo->add_do_method(this, "call_deferred", "update_autoload");
undo_redo->add_undo_method(this, "call_deferred", "update_autoload");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_autoload");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_autoload");
undo_redo->add_do_method(this, "emit_signal", autoload_changed);
undo_redo->add_undo_method(this, "emit_signal", autoload_changed);

View file

@ -349,7 +349,7 @@ EditorCommandPalette::EditorCommandPalette() {
command_search_box = memnew(LineEdit);
command_search_box->set_placeholder(TTR("Filter Commands"));
command_search_box->connect("gui_input", callable_mp(this, &EditorCommandPalette::_sbox_input));
command_search_box->connect(SceneStringName(gui_input), callable_mp(this, &EditorCommandPalette::_sbox_input));
command_search_box->connect("text_changed", callable_mp(this, &EditorCommandPalette::_update_command_search));
command_search_box->set_v_size_flags(Control::SIZE_EXPAND_FILL);
command_search_box->set_clear_button_enabled(true);

View file

@ -1217,7 +1217,7 @@ void EditorSelection::add_node(Node *p_node) {
}
selection[p_node] = meta;
p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONE_SHOT);
p_node->connect(SceneStringName(tree_exiting), callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONE_SHOT);
}
void EditorSelection::remove_node(Node *p_node) {
@ -1234,7 +1234,7 @@ void EditorSelection::remove_node(Node *p_node) {
}
selection.erase(p_node);
p_node->disconnect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed));
p_node->disconnect(SceneStringName(tree_exiting), callable_mp(this, &EditorSelection::_node_removed));
}
bool EditorSelection::is_selected(Node *p_node) const {

View file

@ -85,7 +85,7 @@ void DockSplitContainer::add_child_notify(Node *p_child) {
return;
}
child_control->connect("visibility_changed", callable_mp(this, &DockSplitContainer::_update_visibility));
child_control->connect(SceneStringName(visibility_changed), callable_mp(this, &DockSplitContainer::_update_visibility));
_update_visibility();
}
@ -104,7 +104,7 @@ void DockSplitContainer::remove_child_notify(Node *p_child) {
return;
}
child_control->disconnect("visibility_changed", callable_mp(this, &DockSplitContainer::_update_visibility));
child_control->disconnect(SceneStringName(visibility_changed), callable_mp(this, &DockSplitContainer::_update_visibility));
_update_visibility();
}
@ -280,7 +280,7 @@ void EditorDockManager::_dock_move_to_bottom(Control *p_dock) {
// Force docks moved to the bottom to appear first in the list, and give them their associated shortcut to toggle their bottom panel.
Button *bottom_button = EditorNode::get_bottom_panel()->add_item(all_docks[p_dock].title, p_dock, all_docks[p_dock].shortcut, true);
bottom_button->connect("gui_input", callable_mp(this, &EditorDockManager::_bottom_dock_button_gui_input).bind(bottom_button).bind(p_dock));
bottom_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorDockManager::_bottom_dock_button_gui_input).bind(bottom_button).bind(p_dock));
EditorNode::get_bottom_panel()->make_item_visible(p_dock);
}
@ -809,7 +809,7 @@ void EditorDockManager::register_dock_slot(DockSlot p_dock_slot, TabContainer *p
p_tab_container->connect("active_tab_rearranged", callable_mp(this, &EditorDockManager::_update_layout).unbind(1));
p_tab_container->connect("child_order_changed", callable_mp(this, &EditorDockManager::_dock_container_update_visibility).bind(p_tab_container));
p_tab_container->set_use_hidden_tabs_for_min_size(true);
p_tab_container->get_tab_bar()->connect("gui_input", callable_mp(this, &EditorDockManager::_dock_container_gui_input).bind(p_tab_container));
p_tab_container->get_tab_bar()->connect(SceneStringName(gui_input), callable_mp(this, &EditorDockManager::_dock_container_gui_input).bind(p_tab_container));
p_tab_container->hide();
}
@ -832,7 +832,7 @@ EditorDockManager::EditorDockManager() {
docks_menu = memnew(PopupMenu);
docks_menu->set_hide_on_item_selection(false);
docks_menu->connect("id_pressed", callable_mp(this, &EditorDockManager::_docks_menu_option));
EditorNode::get_singleton()->get_gui_base()->connect("theme_changed", callable_mp(this, &EditorDockManager::_update_docks_menu));
EditorNode::get_singleton()->get_gui_base()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorDockManager::_update_docks_menu));
}
void DockContextPopup::_notification(int p_what) {
@ -1092,9 +1092,9 @@ DockContextPopup::DockContextPopup() {
dock_select = memnew(Control);
dock_select->set_custom_minimum_size(Size2(128, 64) * EDSCALE);
dock_select->connect("gui_input", callable_mp(this, &DockContextPopup::_dock_select_input));
dock_select->connect("draw", callable_mp(this, &DockContextPopup::_dock_select_draw));
dock_select->connect("mouse_exited", callable_mp(this, &DockContextPopup::_dock_select_mouse_exited));
dock_select->connect(SceneStringName(gui_input), callable_mp(this, &DockContextPopup::_dock_select_input));
dock_select->connect(SceneStringName(draw), callable_mp(this, &DockContextPopup::_dock_select_draw));
dock_select->connect(SceneStringName(mouse_exited), callable_mp(this, &DockContextPopup::_dock_select_mouse_exited));
dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_select_popup_vb->add_child(dock_select);

View file

@ -196,7 +196,7 @@ void EditorHelp::_update_theme_item_cache() {
class_desc->add_theme_font_override("normal_font", theme_cache.doc_font);
class_desc->add_theme_font_size_override("normal_font_size", theme_cache.doc_font_size);
class_desc->add_theme_constant_override("line_separation", get_theme_constant(SNAME("line_separation"), SNAME("EditorHelp")));
class_desc->add_theme_constant_override(SceneStringName(line_separation), get_theme_constant(SceneStringName(line_separation), SNAME("EditorHelp")));
class_desc->add_theme_constant_override("table_h_separation", get_theme_constant(SNAME("table_h_separation"), SNAME("EditorHelp")));
class_desc->add_theme_constant_override("table_v_separation", get_theme_constant(SNAME("table_v_separation"), SNAME("EditorHelp")));
class_desc->add_theme_constant_override("text_highlight_h_padding", get_theme_constant(SNAME("text_highlight_h_padding"), SNAME("EditorHelp")));
@ -2340,7 +2340,7 @@ void EditorHelp::_help_callback(const String &p_topic) {
if (class_desc->is_ready()) {
// call_deferred() is not enough.
class_desc->connect("draw", callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).bind(line), CONNECT_ONE_SHOT | CONNECT_DEFERRED);
class_desc->connect(SceneStringName(draw), callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).bind(line), CONNECT_ONE_SHOT | CONNECT_DEFERRED);
} else {
scroll_to = line;
}
@ -3099,10 +3099,10 @@ EditorHelp::EditorHelp() {
class_desc->set_threaded(true);
class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
class_desc->connect("finished", callable_mp(this, &EditorHelp::_class_desc_finished));
class_desc->connect(SceneStringName(finished), callable_mp(this, &EditorHelp::_class_desc_finished));
class_desc->connect("meta_clicked", callable_mp(this, &EditorHelp::_class_desc_select));
class_desc->connect("gui_input", callable_mp(this, &EditorHelp::_class_desc_input));
class_desc->connect("resized", callable_mp(this, &EditorHelp::_class_desc_resized).bind(false));
class_desc->connect(SceneStringName(gui_input), callable_mp(this, &EditorHelp::_class_desc_input));
class_desc->connect(SceneStringName(resized), callable_mp(this, &EditorHelp::_class_desc_resized).bind(false));
// Added second so it opens at the bottom so it won't offset the entire widget.
find_bar = memnew(FindBar);
@ -3857,8 +3857,8 @@ EditorHelpBitTooltip::EditorHelpBitTooltip(Control *p_target) {
add_child(timer);
ERR_FAIL_NULL(p_target);
p_target->connect("mouse_entered", callable_mp(timer, &Timer::stop));
p_target->connect("mouse_exited", callable_mp(timer, &Timer::start).bind(-1));
p_target->connect(SceneStringName(mouse_entered), callable_mp(timer, &Timer::stop));
p_target->connect(SceneStringName(mouse_exited), callable_mp(timer, &Timer::start).bind(-1));
}
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)

View file

@ -315,7 +315,7 @@ EditorHelpSearch::EditorHelpSearch() {
search_box->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_box->set_clear_button_enabled(true);
search_box->connect("gui_input", callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
search_box->connect(SceneStringName(gui_input), callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
search_box->connect("text_changed", callable_mp(this, &EditorHelpSearch::_search_box_text_changed));
register_text_enter(search_box);
hbox->add_child(search_box);

View file

@ -647,7 +647,7 @@ void EditorProperty::_focusable_focused(int p_index) {
}
void EditorProperty::add_focusable(Control *p_control) {
p_control->connect("focus_entered", callable_mp(this, &EditorProperty::_focusable_focused).bind(focusables.size()));
p_control->connect(SceneStringName(focus_entered), callable_mp(this, &EditorProperty::_focusable_focused).bind(focusables.size()));
focusables.push_back(p_control);
}
@ -2164,10 +2164,10 @@ void EditorInspectorArray::_setup() {
int element_position = begin_array_index + i;
ae.panel->set_meta("index", element_position);
ae.panel->set_tooltip_text(vformat(TTR("Element %d: %s%d*"), element_position, array_element_prefix, element_position));
ae.panel->connect("focus_entered", callable_mp((CanvasItem *)ae.panel, &PanelContainer::queue_redraw));
ae.panel->connect("focus_exited", callable_mp((CanvasItem *)ae.panel, &PanelContainer::queue_redraw));
ae.panel->connect("draw", callable_mp(this, &EditorInspectorArray::_panel_draw).bind(i));
ae.panel->connect("gui_input", callable_mp(this, &EditorInspectorArray::_panel_gui_input).bind(i));
ae.panel->connect(SceneStringName(focus_entered), callable_mp((CanvasItem *)ae.panel, &PanelContainer::queue_redraw));
ae.panel->connect(SceneStringName(focus_exited), callable_mp((CanvasItem *)ae.panel, &PanelContainer::queue_redraw));
ae.panel->connect(SceneStringName(draw), callable_mp(this, &EditorInspectorArray::_panel_draw).bind(i));
ae.panel->connect(SceneStringName(gui_input), callable_mp(this, &EditorInspectorArray::_panel_gui_input).bind(i));
ae.panel->add_theme_style_override(SNAME("panel"), i % 2 ? odd_style : even_style);
elements_vbox->add_child(ae.panel);
@ -2434,7 +2434,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
vbox->add_child(add_button);
control_dropping = memnew(Control);
control_dropping->connect("draw", callable_mp(this, &EditorInspectorArray::_control_dropping_draw));
control_dropping->connect(SceneStringName(draw), callable_mp(this, &EditorInspectorArray::_control_dropping_draw));
control_dropping->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
add_child(control_dropping);
@ -2454,7 +2454,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
new_size_spin_box->set_editable(!read_only);
resize_dialog_vbox->add_margin_child(TTRC("New Size:"), new_size_spin_box);
vbox->connect("visibility_changed", callable_mp(this, &EditorInspectorArray::_vbox_visibility_changed));
vbox->connect(SceneStringName(visibility_changed), callable_mp(this, &EditorInspectorArray::_vbox_visibility_changed));
}
////////////////////////////////////////////////
@ -3522,7 +3522,7 @@ void EditorInspector::edit(Object *p_object) {
next_object = p_object; // Some plugins need to know the next edited object when clearing the inspector.
if (object) {
object->disconnect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
object->disconnect(CoreStringName(property_list_changed), callable_mp(this, &EditorInspector::_changed_callback));
_clear();
}
per_array_page.clear();
@ -3534,7 +3534,7 @@ void EditorInspector::edit(Object *p_object) {
if (scroll_cache.has(object->get_instance_id())) { //if exists, set something else
update_scroll_request = scroll_cache[object->get_instance_id()]; //done this way because wait until full size is accommodated
}
object->connect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
object->connect(CoreStringName(property_list_changed), callable_mp(this, &EditorInspector::_changed_callback));
update_tree();
}

View file

@ -131,8 +131,8 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
name->set_offset(SIDE_TOP, 5);
name->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
name->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5);
name->connect("gui_input", callable_mp(this, &EditorLayoutsDialog::_line_gui_input));
name->connect("focus_entered", callable_mp(this, &EditorLayoutsDialog::_deselect_layout_names));
name->connect(SceneStringName(gui_input), callable_mp(this, &EditorLayoutsDialog::_line_gui_input));
name->connect(SceneStringName(focus_entered), callable_mp(this, &EditorLayoutsDialog::_deselect_layout_names));
name->connect("text_changed", callable_mp(this, &EditorLayoutsDialog::_update_ok_disable_state).unbind(1));
}

View file

@ -32,6 +32,7 @@
#include "editor/code_editor.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/text_edit.h"
#include "servers/rendering/shader_language.h"
@ -95,8 +96,8 @@ void EditorNativeShaderSourceVisualizer::_inspect_shader(RID p_shader) {
CodeEdit *code_edit = memnew(CodeEdit);
code_edit->set_editable(false);
code_edit->set_syntax_highlighter(syntax_highlighter);
code_edit->add_theme_font_override("font", get_theme_font("source", "EditorFonts"));
code_edit->add_theme_font_size_override("font_size", get_theme_font_size("source_size", "EditorFonts"));
code_edit->add_theme_font_override("font", get_theme_font("source", EditorStringName(EditorFonts)));
code_edit->add_theme_font_size_override("font_size", get_theme_font_size("source_size", EditorStringName(EditorFonts)));
code_edit->add_theme_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 6));
// Appearance: Caret

View file

@ -7109,7 +7109,7 @@ EditorNode::EditorNode() {
Button *output_button = bottom_panel->add_item(TTR("Output"), log, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_output_bottom_panel", TTR("Toggle Output Bottom Panel"), KeyModifierMask::ALT | Key::O));
log->set_tool_button(output_button);
center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
center_split->connect(SceneStringName(resized), callable_mp(this, &EditorNode::_vp_resized));
native_shader_source_visualizer = memnew(EditorNativeShaderSourceVisualizer);
gui_base->add_child(native_shader_source_visualizer);

View file

@ -31,7 +31,6 @@
#include "editor_properties.h"
#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "editor/create_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_properties_array_dict.h"
@ -457,7 +456,7 @@ EditorPropertyLocale::EditorPropertyLocale() {
locale = memnew(LineEdit);
locale_hb->add_child(locale);
locale->connect("text_submitted", callable_mp(this, &EditorPropertyLocale::_locale_selected));
locale->connect("focus_exited", callable_mp(this, &EditorPropertyLocale::_locale_focus_exited));
locale->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyLocale::_locale_focus_exited));
locale->set_h_size_flags(SIZE_EXPAND_FILL);
locale_edit = memnew(Button);
@ -598,7 +597,7 @@ EditorPropertyPath::EditorPropertyPath() {
path->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
path_hb->add_child(path);
path->connect("text_submitted", callable_mp(this, &EditorPropertyPath::_path_selected));
path->connect("focus_exited", callable_mp(this, &EditorPropertyPath::_path_focus_exited));
path->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyPath::_path_focus_exited));
path->set_h_size_flags(SIZE_EXPAND_FILL);
path_edit = memnew(Button);
@ -1681,8 +1680,8 @@ void EditorPropertyEasing::_bind_methods() {
EditorPropertyEasing::EditorPropertyEasing() {
easing_draw = memnew(Control);
easing_draw->connect("draw", callable_mp(this, &EditorPropertyEasing::_draw_easing));
easing_draw->connect("gui_input", callable_mp(this, &EditorPropertyEasing::_drag_easing));
easing_draw->connect(SceneStringName(draw), callable_mp(this, &EditorPropertyEasing::_draw_easing));
easing_draw->connect(SceneStringName(gui_input), callable_mp(this, &EditorPropertyEasing::_drag_easing));
easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE);
add_child(easing_draw);
@ -1699,7 +1698,7 @@ EditorPropertyEasing::EditorPropertyEasing() {
spin->set_allow_lesser(true);
spin->set_allow_greater(true);
spin->connect("value_changed", callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
spin->get_line_edit()->connect("focus_exited", callable_mp(this, &EditorPropertyEasing::_spin_focus_exited));
spin->get_line_edit()->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyEasing::_spin_focus_exited));
spin->hide();
add_child(spin);
}
@ -3000,7 +2999,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
edit = memnew(LineEdit);
edit->set_h_size_flags(SIZE_EXPAND_FILL);
edit->hide();
edit->connect(SNAME("focus_exited"), callable_mp(this, &EditorPropertyNodePath::_accept_text));
edit->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyNodePath::_accept_text));
edit->connect(SNAME("text_submitted"), callable_mp(this, &EditorPropertyNodePath::_text_submitted));
hbc->add_child(edit);
}
@ -3280,7 +3279,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const
EditorShaderPicker *shader_picker = memnew(EditorShaderPicker);
shader_picker->set_edited_material(Object::cast_to<ShaderMaterial>(p_object));
resource_picker = shader_picker;
connect(SNAME("ready"), callable_mp(this, &EditorPropertyResource::_update_preferred_shader));
connect(SceneStringName(ready), callable_mp(this, &EditorPropertyResource::_update_preferred_shader));
} else if (p_base_type == "AudioStream") {
EditorAudioStreamPicker *astream_picker = memnew(EditorAudioStreamPicker);
resource_picker = astream_picker;

View file

@ -273,7 +273,7 @@ void EditorPropertyArray::_create_new_property_slot() {
reorder_button->set_icon(get_editor_theme_icon(SNAME("TripleBar")));
reorder_button->set_default_cursor_shape(Control::CURSOR_MOVE);
reorder_button->set_disabled(is_read_only());
reorder_button->connect(SNAME("gui_input"), callable_mp(this, &EditorPropertyArray::_reorder_button_gui_input));
reorder_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorPropertyArray::_reorder_button_gui_input));
reorder_button->connect(SNAME("button_up"), callable_mp(this, &EditorPropertyArray::_reorder_button_up));
reorder_button->connect(SNAME("button_down"), callable_mp(this, &EditorPropertyArray::_reorder_button_down).bind(idx));
@ -832,7 +832,7 @@ EditorPropertyArray::EditorPropertyArray() {
edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_edit_pressed));
edit->set_toggle_mode(true);
SET_DRAG_FORWARDING_CD(edit, EditorPropertyArray);
edit->connect("draw", callable_mp(this, &EditorPropertyArray::_button_draw));
edit->connect(SceneStringName(draw), callable_mp(this, &EditorPropertyArray::_button_draw));
add_child(edit);
add_focusable(edit);

View file

@ -293,7 +293,7 @@ EditorQuickOpen::EditorQuickOpen() {
search_box = memnew(LineEdit);
search_box->connect("text_changed", callable_mp(this, &EditorQuickOpen::_text_changed));
search_box->connect("gui_input", callable_mp(this, &EditorQuickOpen::_sbox_input));
search_box->connect(SceneStringName(gui_input), callable_mp(this, &EditorQuickOpen::_sbox_input));
vbc->add_margin_child(TTR("Search:"), search_box);
register_text_enter(search_box);

View file

@ -102,7 +102,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
}
if (p_preview.is_valid()) {
preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(SNAME("normal"))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(CoreStringName(normal))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
// Resource-specific stretching.
if (Ref<GradientTexture1D>(edited_resource).is_valid() || Ref<Gradient>(edited_resource).is_valid()) {
@ -1044,8 +1044,8 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
SET_DRAG_FORWARDING_GCD(assign_button, EditorResourcePicker);
add_child(assign_button);
assign_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_resource_selected));
assign_button->connect("draw", callable_mp(this, &EditorResourcePicker::_button_draw));
assign_button->connect("gui_input", callable_mp(this, &EditorResourcePicker::_button_input));
assign_button->connect(SceneStringName(draw), callable_mp(this, &EditorResourcePicker::_button_draw));
assign_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorResourcePicker::_button_input));
if (!p_hide_assign_button_controls) {
preview_rect = memnew(TextureRect);
@ -1063,7 +1063,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
edit_button->set_toggle_mode(true);
edit_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_update_menu));
add_child(edit_button);
edit_button->connect("gui_input", callable_mp(this, &EditorResourcePicker::_button_input));
edit_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorResourcePicker::_button_input));
add_theme_constant_override("separation", 0);
}
@ -1332,7 +1332,7 @@ EditorAudioStreamPicker::EditorAudioStreamPicker() :
stream_preview_rect->set_offset(SIDE_BOTTOM, -1);
stream_preview_rect->set_offset(SIDE_RIGHT, -1);
stream_preview_rect->set_mouse_filter(MOUSE_FILTER_IGNORE);
stream_preview_rect->connect("draw", callable_mp(this, &EditorAudioStreamPicker::_preview_draw));
stream_preview_rect->connect(SceneStringName(draw), callable_mp(this, &EditorAudioStreamPicker::_preview_draw));
get_assign_button()->add_child(stream_preview_rect);
get_assign_button()->move_child(stream_preview_rect, 0);

View file

@ -778,8 +778,8 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcut_search_by_event->set_stretch_ratio(0.75);
shortcut_search_by_event->set_allowed_input_types(INPUT_KEY);
shortcut_search_by_event->connect("event_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts_by_event));
shortcut_search_by_event->connect("focus_entered", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false));
shortcut_search_by_event->connect("focus_exited", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
shortcut_search_by_event->connect(SceneStringName(focus_entered), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false));
shortcut_search_by_event->connect(SceneStringName(focus_exited), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
top_hbox->add_child(shortcut_search_by_event);
Button *clear_all_search = memnew(Button);

View file

@ -217,8 +217,8 @@ void EventListenerLineEdit::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("text_changed", callable_mp(this, &EventListenerLineEdit::_on_text_changed));
connect("focus_entered", callable_mp(this, &EventListenerLineEdit::_on_focus));
connect("focus_exited", callable_mp(this, &EventListenerLineEdit::_on_unfocus));
connect(SceneStringName(focus_entered), callable_mp(this, &EventListenerLineEdit::_on_focus));
connect(SceneStringName(focus_exited), callable_mp(this, &EventListenerLineEdit::_on_unfocus));
set_right_icon(get_editor_theme_icon(SNAME("Keyboard")));
set_clear_button_enabled(true);
} break;

View file

@ -313,7 +313,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
_sort_file_info_list(file_list);
// Build the tree.
const int icon_size = get_theme_constant(SNAME("class_icon_size"), SNAME("Editor"));
const int icon_size = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
for (const FileInfo &fi : file_list) {
TreeItem *file_item = tree->create_item(subdirectory_item);
@ -4023,8 +4023,8 @@ FileSystemDock::FileSystemDock() {
tree->connect("item_mouse_selected", callable_mp(this, &FileSystemDock::_tree_rmb_select));
tree->connect("empty_clicked", callable_mp(this, &FileSystemDock::_tree_empty_click));
tree->connect("nothing_selected", callable_mp(this, &FileSystemDock::_tree_empty_selected));
tree->connect("gui_input", callable_mp(this, &FileSystemDock::_tree_gui_input));
tree->connect("mouse_exited", callable_mp(this, &FileSystemDock::_tree_mouse_exited));
tree->connect(SceneStringName(gui_input), callable_mp(this, &FileSystemDock::_tree_gui_input));
tree->connect(SceneStringName(mouse_exited), callable_mp(this, &FileSystemDock::_tree_mouse_exited));
tree->connect("item_edited", callable_mp(this, &FileSystemDock::_rename_operation_confirm));
file_list_vb = memnew(VBoxContainer);
@ -4053,7 +4053,7 @@ FileSystemDock::FileSystemDock() {
files->set_select_mode(ItemList::SELECT_MULTI);
SET_DRAG_FORWARDING_GCD(files, FileSystemDock);
files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_item_clicked));
files->connect("gui_input", callable_mp(this, &FileSystemDock::_file_list_gui_input));
files->connect(SceneStringName(gui_input), callable_mp(this, &FileSystemDock::_file_list_gui_input));
files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected));
files->connect("empty_clicked", callable_mp(this, &FileSystemDock::_file_list_empty_clicked));
files->connect("item_edited", callable_mp(this, &FileSystemDock::_rename_operation_confirm));

View file

@ -47,7 +47,6 @@
#include "scene/gui/tree.h"
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
const char *FindInFiles::SIGNAL_FINISHED = "finished";
// TODO: Would be nice in Vector and Vectors.
template <typename T>
@ -115,12 +114,12 @@ void FindInFiles::_notification(int p_what) {
void FindInFiles::start() {
if (_pattern.is_empty()) {
print_verbose("Nothing to search, pattern is empty");
emit_signal(SNAME(SIGNAL_FINISHED));
emit_signal(SceneStringName(finished));
return;
}
if (_extension_filter.size() == 0) {
print_verbose("Nothing to search, filter matches no files");
emit_signal(SNAME(SIGNAL_FINISHED));
emit_signal(SceneStringName(finished));
return;
}
@ -202,7 +201,7 @@ void FindInFiles::_iterate() {
set_process(false);
_current_dir = "";
_searching = false;
emit_signal(SNAME(SIGNAL_FINISHED));
emit_signal(SceneStringName(finished));
}
}
@ -292,7 +291,7 @@ void FindInFiles::_bind_methods() {
PropertyInfo(Variant::INT, "end"),
PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo(SIGNAL_FINISHED));
ADD_SIGNAL(MethodInfo("finished"));
}
//-----------------------------------------------------------------------------
@ -573,7 +572,7 @@ const char *FindInFilesPanel::SIGNAL_CLOSE_BUTTON_CLICKED = "close_button_clicke
FindInFilesPanel::FindInFilesPanel() {
_finder = memnew(FindInFiles);
_finder->connect(FindInFiles::SIGNAL_RESULT_FOUND, callable_mp(this, &FindInFilesPanel::_on_result_found));
_finder->connect(FindInFiles::SIGNAL_FINISHED, callable_mp(this, &FindInFilesPanel::_on_finished));
_finder->connect(SceneStringName(finished), callable_mp(this, &FindInFilesPanel::_on_finished));
add_child(_finder);
VBoxContainer *vbc = memnew(VBoxContainer);

View file

@ -80,8 +80,8 @@ void GroupSettingsEditor::_item_edited() {
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, new_description);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, old_description);
undo_redo->add_do_method(this, "call_deferred", "update_groups");
undo_redo->add_undo_method(this, "call_deferred", "update_groups");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_do_method(this, "emit_signal", group_changed);
undo_redo->add_undo_method(this, "emit_signal", group_changed);
@ -157,8 +157,8 @@ void GroupSettingsEditor::_add_group(const String &p_name, const String &p_descr
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, p_description);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, Variant());
undo_redo->add_do_method(this, "call_deferred", "update_groups");
undo_redo->add_undo_method(this, "call_deferred", "update_groups");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_do_method(this, "emit_signal", group_changed);
undo_redo->add_undo_method(this, "emit_signal", group_changed);
@ -354,8 +354,8 @@ void GroupSettingsEditor::_confirm_rename() {
undo_redo->add_undo_method(this, "rename_references", new_name, old_name);
}
undo_redo->add_do_method(this, "call_deferred", "update_groups");
undo_redo->add_undo_method(this, "call_deferred", "update_groups");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_do_method(this, "emit_signal", group_changed);
undo_redo->add_undo_method(this, "emit_signal", group_changed);
@ -383,8 +383,8 @@ void GroupSettingsEditor::_confirm_delete() {
undo_redo->add_do_method(this, "remove_references", name);
}
undo_redo->add_do_method(this, "call_deferred", "update_groups");
undo_redo->add_undo_method(this, "call_deferred", "update_groups");
undo_redo->add_do_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_undo_method(this, CoreStringName(call_deferred), "update_groups");
undo_redo->add_do_method(this, "emit_signal", group_changed);
undo_redo->add_undo_method(this, "emit_signal", group_changed);

View file

@ -32,6 +32,7 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_validation_panel.h"
#include "editor/project_settings_editor.h"
@ -202,7 +203,7 @@ void GroupsEditor::_update_tree() {
TreeItem *local_root = tree->create_item(root);
local_root->set_text(0, TTR("Scene Groups"));
local_root->set_icon(0, get_editor_theme_icon(SNAME("PackedScene")));
local_root->set_custom_bg_color(0, get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
local_root->set_custom_bg_color(0, get_theme_color(SNAME("prop_subsection"), EditorStringName(Editor)));
local_root->set_selectable(0, false);
List<StringName> scene_keys;
@ -239,7 +240,7 @@ void GroupsEditor::_update_tree() {
TreeItem *global_root = tree->create_item(root);
global_root->set_text(0, TTR("Global Groups"));
global_root->set_icon(0, get_editor_theme_icon(SNAME("Environment")));
global_root->set_custom_bg_color(0, get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
global_root->set_custom_bg_color(0, get_theme_color(SNAME("prop_subsection"), EditorStringName(Editor)));
global_root->set_selectable(0, false);
for (const StringName &E : keys) {
@ -853,7 +854,7 @@ GroupsEditor::GroupsEditor() {
tree->set_select_mode(Tree::SelectMode::SELECT_SINGLE);
tree->connect("button_clicked", callable_mp(this, &GroupsEditor::_modify_group));
tree->connect("item_mouse_selected", callable_mp(this, &GroupsEditor::_item_mouse_selected));
tree->connect("gui_input", callable_mp(this, &GroupsEditor::_groups_gui_input));
tree->connect(SceneStringName(gui_input), callable_mp(this, &GroupsEditor::_groups_gui_input));
add_child(tree);
menu = memnew(PopupMenu);

View file

@ -402,10 +402,10 @@ EditorSceneTabs::EditorSceneTabs() {
scene_tabs->connect("tab_button_pressed", callable_mp(this, &EditorSceneTabs::_scene_tab_script_edited));
scene_tabs->connect("tab_close_pressed", callable_mp(this, &EditorSceneTabs::_scene_tab_closed));
scene_tabs->connect("tab_hovered", callable_mp(this, &EditorSceneTabs::_scene_tab_hovered));
scene_tabs->connect("mouse_exited", callable_mp(this, &EditorSceneTabs::_scene_tab_exit));
scene_tabs->connect("gui_input", callable_mp(this, &EditorSceneTabs::_scene_tab_input));
scene_tabs->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorSceneTabs::_scene_tab_exit));
scene_tabs->connect(SceneStringName(gui_input), callable_mp(this, &EditorSceneTabs::_scene_tab_input));
scene_tabs->connect("active_tab_rearranged", callable_mp(this, &EditorSceneTabs::_reposition_active_tab));
scene_tabs->connect("resized", callable_mp(this, &EditorSceneTabs::_scene_tabs_resized));
scene_tabs->connect(SceneStringName(resized), callable_mp(this, &EditorSceneTabs::_scene_tabs_resized));
scene_tabs_context_menu = memnew(PopupMenu);
tabbar_container->add_child(scene_tabs_context_menu);

View file

@ -290,7 +290,7 @@ void EditorSpinSlider::_update_value_input_stylebox() {
// Add a left margin to the stylebox to make the number align with the Label
// when it's edited. The LineEdit "focus" stylebox uses the "normal" stylebox's
// default margins.
Ref<StyleBox> stylebox = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->duplicate();
Ref<StyleBox> stylebox = get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate();
// EditorSpinSliders with a label have more space on the left, so add an
// higher margin to match the location where the text begins.
// The margin values below were determined by empirical testing.
@ -310,7 +310,7 @@ void EditorSpinSlider::_draw_spin_slider() {
bool rtl = is_layout_rtl();
Vector2 size = get_size();
Ref<StyleBox> sb = get_theme_stylebox(is_read_only() ? SNAME("read_only") : SNAME("normal"), SNAME("LineEdit"));
Ref<StyleBox> sb = get_theme_stylebox(is_read_only() ? SNAME("read_only") : CoreStringName(normal), SNAME("LineEdit"));
if (!flat) {
draw_style_box(sb, Rect2(Vector2(), size));
}
@ -513,7 +513,7 @@ LineEdit *EditorSpinSlider::get_line_edit() {
}
Size2 EditorSpinSlider::get_minimum_size() const {
Ref<StyleBox> sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"));
Ref<StyleBox> sb = get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit"));
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("LineEdit"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("LineEdit"));
@ -712,10 +712,10 @@ void EditorSpinSlider::_ensure_input_popup() {
value_input->set_focus_mode(FOCUS_CLICK);
value_input_popup->add_child(value_input);
value_input->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
value_input_popup->connect("hidden", callable_mp(this, &EditorSpinSlider::_value_input_closed));
value_input_popup->connect(SceneStringName(hidden), callable_mp(this, &EditorSpinSlider::_value_input_closed));
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
value_input->connect("gui_input", callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
value_input->connect(SceneStringName(focus_exited), callable_mp(this, &EditorSpinSlider::_value_focus_exited));
value_input->connect(SceneStringName(gui_input), callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
if (is_inside_tree()) {
_update_value_input_stylebox();
@ -729,7 +729,7 @@ EditorSpinSlider::EditorSpinSlider() {
grabber->hide();
grabber->set_as_top_level(true);
grabber->set_mouse_filter(MOUSE_FILTER_STOP);
grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
grabber->connect(SceneStringName(mouse_entered), callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
grabber->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
grabber->connect(SceneStringName(gui_input), callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
}

View file

@ -360,7 +360,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
break;
}
panel->set_modulate(Color(1, 1, 1, 0));
panel->connect("draw", callable_mp(this, &EditorToaster::_draw_progress).bind(panel));
panel->connect(SceneStringName(draw), callable_mp(this, &EditorToaster::_draw_progress).bind(panel));
// Horizontal container.
HBoxContainer *hbox_container = memnew(HBoxContainer);
@ -377,7 +377,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
close_button->set_flat(true);
close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
close_button->connect("pressed", callable_mp(this, &EditorToaster::close).bind(panel));
close_button->connect("theme_changed", callable_mp(this, &EditorToaster::_close_button_theme_changed).bind(close_button));
close_button->connect(SceneStringName(theme_changed), callable_mp(this, &EditorToaster::_close_button_theme_changed).bind(close_button));
hbox_container->add_child(close_button);
}
@ -506,7 +506,7 @@ EditorToaster::EditorToaster() {
// VBox.
vbox_container = memnew(VBoxContainer);
vbox_container->set_as_top_level(true);
vbox_container->connect("resized", callable_mp(this, &EditorToaster::_update_vbox_position));
vbox_container->connect(SceneStringName(resized), callable_mp(this, &EditorToaster::_update_vbox_position));
add_child(vbox_container);
// Theming (background).
@ -546,7 +546,7 @@ EditorToaster::EditorToaster() {
main_button->set_theme_type_variation("FlatMenuButton");
main_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(true));
main_button->connect("pressed", callable_mp(this, &EditorToaster::_repop_old));
main_button->connect("draw", callable_mp(this, &EditorToaster::_draw_button));
main_button->connect(SceneStringName(draw), callable_mp(this, &EditorToaster::_draw_button));
add_child(main_button);
// Disable notification button.

View file

@ -373,8 +373,8 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
if (can_open_instance && is_scene_tree_dock) { // Show buttons only when necessary (SceneTreeDock) to avoid crashes.
if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
if (!p_node->is_connected(CoreStringName(script_changed), callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->connect(CoreStringName(script_changed), callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
}
Ref<Script> scr = p_node->get_script();
@ -394,7 +394,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_button_color(0, item->get_button_count(0) - 1, button_color);
}
if (p_node->has_method("is_visible") && p_node->has_method("set_visible") && p_node->has_signal("visibility_changed")) {
if (p_node->has_method("is_visible") && p_node->has_method("set_visible") && p_node->has_signal(SceneStringName(visibility_changed))) {
bool is_visible = p_node->call("is_visible");
if (is_visible) {
item->add_button(0, get_editor_theme_icon(SNAME("GuiVisibilityVisible")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
@ -402,8 +402,8 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->add_button(0, get_editor_theme_icon(SNAME("GuiVisibilityHidden")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
}
const Callable vis_changed = callable_mp(this, &SceneTreeEditor::_node_visibility_changed);
if (!p_node->is_connected("visibility_changed", vis_changed)) {
p_node->connect("visibility_changed", vis_changed.bind(p_node));
if (!p_node->is_connected(SceneStringName(visibility_changed), vis_changed)) {
p_node->connect(SceneStringName(visibility_changed), vis_changed.bind(p_node));
}
_update_visibility_color(p_node, item);
}
@ -573,13 +573,13 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
return; //speed up exit
}
if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->disconnect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed));
if (p_node->is_connected(CoreStringName(script_changed), callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->disconnect(CoreStringName(script_changed), callable_mp(this, &SceneTreeEditor::_node_script_changed));
}
if (p_node->has_signal("visibility_changed")) {
if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
p_node->disconnect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed));
if (p_node->has_signal(SceneStringName(visibility_changed))) {
if (p_node->is_connected(SceneStringName(visibility_changed), callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
p_node->disconnect(SceneStringName(visibility_changed), callable_mp(this, &SceneTreeEditor::_node_visibility_changed));
}
}
@ -912,7 +912,7 @@ void SceneTreeEditor::_notification(int p_what) {
get_tree()->connect("tree_process_mode_changed", callable_mp(this, &SceneTreeEditor::_tree_process_mode_changed));
get_tree()->connect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
get_tree()->connect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
get_tree()->connect(SceneStringName(node_configuration_warning_changed), callable_mp(this, &SceneTreeEditor::_warning_changed));
tree->connect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
@ -925,7 +925,7 @@ void SceneTreeEditor::_notification(int p_what) {
get_tree()->disconnect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
get_tree()->disconnect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
tree->disconnect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
get_tree()->disconnect(SceneStringName(node_configuration_warning_changed), callable_mp(this, &SceneTreeEditor::_warning_changed));
} break;
case NOTIFICATION_THEME_CHANGED: {

View file

@ -326,8 +326,8 @@ void ResourceImporterScene::_pre_fix_global(Node *p_scene, const HashMap<StringN
Ref<Animation> reset_anim;
for (int i = 0; i < anim_players.size(); i++) {
AnimationPlayer *player = cast_to<AnimationPlayer>(anim_players[i]);
if (player->has_animation(SNAME("RESET"))) {
reset_anim = player->get_animation(SNAME("RESET"));
if (player->has_animation(SceneStringName(RESET))) {
reset_anim = player->get_animation(SceneStringName(RESET));
break;
}
}
@ -341,7 +341,7 @@ void ResourceImporterScene::_pre_fix_global(Node *p_scene, const HashMap<StringN
anim_library.instantiate();
anim_player->add_animation_library(StringName(), anim_library);
}
anim_library->add_animation(SNAME("RESET"), reset_anim);
anim_library->add_animation(SceneStringName(RESET), reset_anim);
}
TypedArray<Node> skeletons = p_scene->find_children("*", "Skeleton3D");
for (int i = 0; i < skeletons.size(); i++) {

View file

@ -411,7 +411,7 @@ void SceneImportSettingsDialog::_fill_scene(Node *p_node, TreeItem *p_parent_ite
category = ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE;
animation_player = Object::cast_to<AnimationPlayer>(p_node);
animation_player->connect(SNAME("animation_finished"), callable_mp(this, &SceneImportSettingsDialog::_animation_finished));
animation_player->connect(SceneStringName(animation_finished), callable_mp(this, &SceneImportSettingsDialog::_animation_finished));
} else if (Object::cast_to<Skeleton3D>(p_node)) {
category = ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE;
skeletons.push_back(Object::cast_to<Skeleton3D>(p_node));
@ -1111,7 +1111,7 @@ void SceneImportSettingsDialog::_scene_tree_selected() {
void SceneImportSettingsDialog::_cleanup() {
skeletons.clear();
if (animation_player != nullptr) {
animation_player->disconnect(SNAME("animation_finished"), callable_mp(this, &SceneImportSettingsDialog::_animation_finished));
animation_player->disconnect(SceneStringName(animation_finished), callable_mp(this, &SceneImportSettingsDialog::_animation_finished));
animation_player = nullptr;
}
set_process(false);
@ -1630,7 +1630,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
vp_container->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vp_container->set_custom_minimum_size(Size2(10, 10));
vp_container->set_stretch(true);
vp_container->connect("gui_input", callable_mp(this, &SceneImportSettingsDialog::_viewport_input));
vp_container->connect(SceneStringName(gui_input), callable_mp(this, &SceneImportSettingsDialog::_viewport_input));
vp_vb->add_child(vp_container);
base_viewport = memnew(SubViewport);

View file

@ -590,7 +590,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
color_rect->set_v_size_flags(Control::SIZE_EXPAND_FILL);
_player = memnew(AudioStreamPlayer);
_player->connect("finished", callable_mp(this, &AudioStreamImportSettingsDialog::_on_finished));
_player->connect(SceneStringName(finished), callable_mp(this, &AudioStreamImportSettingsDialog::_on_finished));
color_rect->add_child(_player);
VBoxContainer *vbox = memnew(VBoxContainer);
@ -600,7 +600,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
_preview = memnew(ColorRect);
_preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);
_preview->connect("draw", callable_mp(this, &AudioStreamImportSettingsDialog::_draw_preview));
_preview->connect(SceneStringName(draw), callable_mp(this, &AudioStreamImportSettingsDialog::_draw_preview));
_preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbox->add_child(_preview);
@ -626,9 +626,9 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
_indicator = memnew(Control);
_indicator->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
_indicator->connect("draw", callable_mp(this, &AudioStreamImportSettingsDialog::_draw_indicator));
_indicator->connect("gui_input", callable_mp(this, &AudioStreamImportSettingsDialog::_on_input_indicator));
_indicator->connect("mouse_exited", callable_mp(this, &AudioStreamImportSettingsDialog::_on_indicator_mouse_exited));
_indicator->connect(SceneStringName(draw), callable_mp(this, &AudioStreamImportSettingsDialog::_draw_indicator));
_indicator->connect(SceneStringName(gui_input), callable_mp(this, &AudioStreamImportSettingsDialog::_on_input_indicator));
_indicator->connect(SceneStringName(mouse_exited), callable_mp(this, &AudioStreamImportSettingsDialog::_on_indicator_mouse_exited));
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);

View file

@ -708,7 +708,7 @@ void ImportDock::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
if (EditorThemeManager::is_generated_theme_outdated()) {
imported->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
imported->add_theme_style_override("normal", get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit")));
}
} break;
@ -765,7 +765,7 @@ ImportDock::ImportDock() {
content->hide();
imported = memnew(Label);
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("normal"), SNAME("LineEdit")));
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(CoreStringName(normal), SNAME("LineEdit")));
imported->set_clip_text(true);
content->add_child(imported);
HBoxContainer *hb = memnew(HBoxContainer);

View file

@ -648,8 +648,8 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
event_listener->set_h_size_flags(Control::SIZE_EXPAND_FILL);
event_listener->set_stretch_ratio(0.75);
event_listener->connect("event_changed", callable_mp(this, &InputEventConfigurationDialog::_on_listen_input_changed));
event_listener->connect("focus_entered", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false));
event_listener->connect("focus_exited", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
event_listener->connect(SceneStringName(focus_entered), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false));
event_listener->connect(SceneStringName(focus_exited), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
main_vbox->add_child(event_listener);
main_vbox->add_child(memnew(HSeparator));

View file

@ -73,7 +73,7 @@ void NodeDock::_on_node_tree_exited() {
void NodeDock::set_node(Node *p_node) {
if (last_valid_node) {
last_valid_node->disconnect("tree_exited", callable_mp(this, &NodeDock::_on_node_tree_exited));
last_valid_node->disconnect(SceneStringName(tree_exited), callable_mp(this, &NodeDock::_on_node_tree_exited));
last_valid_node = nullptr;
}
@ -82,7 +82,7 @@ void NodeDock::set_node(Node *p_node) {
if (p_node) {
last_valid_node = p_node;
last_valid_node->connect("tree_exited", callable_mp(this, &NodeDock::_on_node_tree_exited));
last_valid_node->connect(SceneStringName(tree_exited), callable_mp(this, &NodeDock::_on_node_tree_exited));
if (connections_button->is_pressed()) {
connections->show();

View file

@ -753,8 +753,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
panel->set_v_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
blend_space_draw->connect("gui_input", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input));
blend_space_draw->connect("draw", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_draw));
blend_space_draw->connect(SceneStringName(gui_input), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input));
blend_space_draw->connect(SceneStringName(draw), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_draw));
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);

View file

@ -1030,8 +1030,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
panel->set_h_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
blend_space_draw->connect("gui_input", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_gui_input));
blend_space_draw->connect("draw", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_draw));
blend_space_draw->connect(SceneStringName(gui_input), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_gui_input));
blend_space_draw->connect(SceneStringName(draw), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_draw));
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);

View file

@ -167,7 +167,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, read_only ? -1 : 0, get_theme_color(SNAME("font_color"), SNAME("Label")));
name->connect("text_submitted", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed).bind(agnode), CONNECT_DEFERRED);
name->connect("focus_exited", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out).bind(agnode), CONNECT_DEFERRED);
name->connect(SceneStringName(focus_exited), callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out).bind(agnode), CONNECT_DEFERRED);
name->connect("text_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_rename_lineedit_changed), CONNECT_DEFERRED);
base = 1;
agnode->set_deletable(true);

View file

@ -52,7 +52,6 @@
#include "scene/main/window.h"
#include "scene/resources/animation.h"
#include "scene/resources/image_texture.h"
#include "scene/scene_string_names.h"
#include "servers/rendering_server.h"
///////////////////////////////////
@ -173,8 +172,8 @@ void AnimationPlayerEditor::_notification(int p_what) {
pin->set_icon(get_editor_theme_icon(SNAME("Pin")));
tool_anim->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button")));
track_editor->get_edit_menu()->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button")));
tool_anim->add_theme_style_override("normal", get_theme_stylebox(CoreStringName(normal), SNAME("Button")));
track_editor->get_edit_menu()->add_theme_style_override("normal", get_theme_stylebox(CoreStringName(normal), SNAME("Button")));
#define ITEM_ICON(m_item, m_icon) tool_anim->get_popup()->set_item_icon(tool_anim->get_popup()->get_item_index(m_item), get_editor_theme_icon(SNAME(m_icon)))
@ -2101,7 +2100,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
// Onion skinning.
track_editor->connect(SNAME("visibility_changed"), callable_mp(this, &AnimationPlayerEditor::_editor_visibility_changed));
track_editor->connect(SceneStringName(visibility_changed), callable_mp(this, &AnimationPlayerEditor::_editor_visibility_changed));
onion.capture.canvas = RS::get_singleton()->canvas_create();
onion.capture.canvas_item = RS::get_singleton()->canvas_item_create();

View file

@ -51,7 +51,6 @@
#include "scene/main/viewport.h"
#include "scene/main/window.h"
#include "scene/resources/style_box_flat.h"
#include "scene/scene_string_names.h"
#include "scene/theme/theme_db.h"
bool AnimationNodeStateMachineEditor::can_edit(const Ref<AnimationNode> &p_node) {
@ -185,7 +184,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
if (!read_only) {
if (node_rects[i].name.has_point(mb->get_position()) && state_machine->can_edit_node(node_rects[i].node_name)) { // edit name
// TODO: Avoid using strings, expose a method on LineEdit.
Ref<StyleBox> line_sb = name_edit->get_theme_stylebox(SNAME("normal"));
Ref<StyleBox> line_sb = name_edit->get_theme_stylebox(CoreStringName(normal));
Rect2 edit_rect = node_rects[i].name;
edit_rect.position -= line_sb->get_offset();
edit_rect.size += line_sb->get_minimum_size();
@ -1735,8 +1734,8 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
state_machine_draw = memnew(Control);
panel->add_child(state_machine_draw);
state_machine_draw->connect("gui_input", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_gui_input));
state_machine_draw->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_draw));
state_machine_draw->connect(SceneStringName(gui_input), callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_gui_input));
state_machine_draw->connect(SceneStringName(draw), callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_draw));
state_machine_draw->set_focus_mode(FOCUS_ALL);
state_machine_draw->set_mouse_filter(Control::MOUSE_FILTER_PASS);
@ -1744,7 +1743,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
state_machine_draw->add_child(state_machine_play_pos);
state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent
state_machine_play_pos->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
state_machine_play_pos->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw_all));
state_machine_play_pos->connect(SceneStringName(draw), callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw_all));
v_scroll = memnew(VScrollBar);
state_machine_draw->add_child(v_scroll);
@ -1796,7 +1795,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
name_edit_popup->add_child(name_edit);
name_edit->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
name_edit->connect("text_submitted", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited));
name_edit->connect("focus_exited", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited_focus_out));
name_edit->connect(SceneStringName(focus_exited), callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited_focus_out));
open_file = memnew(EditorFileDialog);
add_child(open_file);
@ -1811,7 +1810,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
delete_tree = memnew(Tree);
delete_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
delete_tree->set_hide_root(true);
delete_tree->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_tree_draw));
delete_tree->connect(SceneStringName(draw), callable_mp(this, &AnimationNodeStateMachineEditor::_delete_tree_draw));
delete_window->add_child(delete_tree);
Button *ok = delete_window->get_cancel_button();

View file

@ -43,7 +43,6 @@
#include "scene/gui/margin_container.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/separator.h"
#include "scene/scene_string_names.h"
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
if (p_tree && !p_tree->is_connected("animation_list_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed))) {

View file

@ -240,7 +240,7 @@ void EditorAssetLibraryItemDescription::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
previews_bg->add_theme_style_override("panel", previews->get_theme_stylebox(SNAME("normal"), SNAME("TextEdit")));
previews_bg->add_theme_style_override("panel", previews->get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit")));
} break;
}
}
@ -330,7 +330,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
desc_vbox->add_child(description);
description->set_v_size_flags(Control::SIZE_EXPAND_FILL);
description->connect("meta_clicked", callable_mp(this, &EditorAssetLibraryItemDescription::_link_click));
description->add_theme_constant_override("line_separation", Math::round(5 * EDSCALE));
description->add_theme_constant_override(SceneStringName(line_separation), Math::round(5 * EDSCALE));
previews_vbox = memnew(VBoxContainer);
previews_vbox->hide(); // Will be shown if we add any previews later.

View file

@ -218,7 +218,7 @@ AudioStreamEditor::AudioStreamEditor() {
set_custom_minimum_size(Size2(1, 100) * EDSCALE);
_player = memnew(AudioStreamPlayer);
_player->connect(SNAME("finished"), callable_mp(this, &AudioStreamEditor::_on_finished));
_player->connect(SceneStringName(finished), callable_mp(this, &AudioStreamEditor::_on_finished));
add_child(_player);
VBoxContainer *vbox = memnew(VBoxContainer);
@ -227,13 +227,13 @@ AudioStreamEditor::AudioStreamEditor() {
_preview = memnew(ColorRect);
_preview->set_v_size_flags(SIZE_EXPAND_FILL);
_preview->connect(SNAME("draw"), callable_mp(this, &AudioStreamEditor::_draw_preview));
_preview->connect(SceneStringName(draw), callable_mp(this, &AudioStreamEditor::_draw_preview));
vbox->add_child(_preview);
_indicator = memnew(Control);
_indicator->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
_indicator->connect(SNAME("draw"), callable_mp(this, &AudioStreamEditor::_draw_indicator));
_indicator->connect(SNAME("gui_input"), callable_mp(this, &AudioStreamEditor::_on_input_indicator));
_indicator->connect(SceneStringName(draw), callable_mp(this, &AudioStreamEditor::_draw_indicator));
_indicator->connect(SceneStringName(gui_input), callable_mp(this, &AudioStreamEditor::_on_input_indicator));
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);

View file

@ -3621,7 +3621,7 @@ void CanvasItemEditor::_draw_selection() {
}
if (!Math::is_inf(temp_pivot.x) || !Math::is_inf(temp_pivot.y)) {
viewport->draw_texture(pivot_icon, (temp_pivot - view_offset) * zoom - (pivot_icon->get_size() / 2).floor(), get_theme_color(SNAME("accent_color"), SNAME("Editor")));
viewport->draw_texture(pivot_icon, (temp_pivot - view_offset) * zoom - (pivot_icon->get_size() / 2).floor(), get_theme_color(SNAME("accent_color"), EditorStringName(Editor)));
}
}
@ -5079,7 +5079,7 @@ void CanvasItemEditor::add_control_to_menu_panel(Control *p_control) {
context_toolbar_hbox->add_child(p_control);
context_toolbar_separators[p_control] = sep;
p_control->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_update_context_toolbar));
p_control->connect(SceneStringName(visibility_changed), callable_mp(this, &CanvasItemEditor::_update_context_toolbar));
_update_context_toolbar();
}
@ -5088,7 +5088,7 @@ void CanvasItemEditor::remove_control_from_menu_panel(Control *p_control) {
ERR_FAIL_NULL(p_control);
ERR_FAIL_COND(p_control->get_parent() != context_toolbar_hbox);
p_control->disconnect("visibility_changed", callable_mp(this, &CanvasItemEditor::_update_context_toolbar));
p_control->disconnect(SceneStringName(visibility_changed), callable_mp(this, &CanvasItemEditor::_update_context_toolbar));
VSeparator *sep = context_toolbar_separators[p_control];
context_toolbar_hbox->remove_child(sep);
@ -5199,7 +5199,7 @@ CanvasItemEditor::CanvasItemEditor() {
viewport_scrollable->set_clip_contents(true);
viewport_scrollable->set_v_size_flags(Control::SIZE_EXPAND_FILL);
viewport_scrollable->set_h_size_flags(Control::SIZE_EXPAND_FILL);
viewport_scrollable->connect("draw", callable_mp(this, &CanvasItemEditor::_update_scrollbars));
viewport_scrollable->connect(SceneStringName(draw), callable_mp(this, &CanvasItemEditor::_update_scrollbars));
SubViewportContainer *scene_tree = memnew(SubViewportContainer);
viewport_scrollable->add_child(scene_tree);
@ -5268,9 +5268,9 @@ CanvasItemEditor::CanvasItemEditor() {
viewport->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
viewport->set_clip_contents(true);
viewport->set_focus_mode(FOCUS_ALL);
viewport->connect("draw", callable_mp(this, &CanvasItemEditor::_draw_viewport));
viewport->connect("gui_input", callable_mp(this, &CanvasItemEditor::_gui_input_viewport));
viewport->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
viewport->connect(SceneStringName(draw), callable_mp(this, &CanvasItemEditor::_draw_viewport));
viewport->connect(SceneStringName(gui_input), callable_mp(this, &CanvasItemEditor::_gui_input_viewport));
viewport->connect(SceneStringName(focus_exited), callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
h_scroll = memnew(HScrollBar);
viewport->add_child(h_scroll);
@ -6142,11 +6142,11 @@ void CanvasItemEditorViewport::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
_update_theme();
connect("mouse_exited", callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
connect(SceneStringName(mouse_exited), callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
} break;
case NOTIFICATION_EXIT_TREE: {
disconnect("mouse_exited", callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
disconnect(SceneStringName(mouse_exited), callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
} break;
case NOTIFICATION_DRAG_END: {

View file

@ -43,7 +43,6 @@
#include "scene/resources/2d/segment_shape_2d.h"
#include "scene/resources/2d/separation_ray_shape_2d.h"
#include "scene/resources/2d/world_boundary_shape_2d.h"
#include "scene/scene_string_names.h"
CollisionShape2DEditor::CollisionShape2DEditor() {
grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");

View file

@ -107,7 +107,7 @@ void EditorDebuggerSession::detach_debugger() {
debugger->disconnect("started", callable_mp(this, &EditorDebuggerSession::_started));
debugger->disconnect("stopped", callable_mp(this, &EditorDebuggerSession::_stopped));
debugger->disconnect("breaked", callable_mp(this, &EditorDebuggerSession::_breaked));
debugger->disconnect("tree_exited", callable_mp(this, &EditorDebuggerSession::_debugger_gone_away));
debugger->disconnect(SceneStringName(tree_exited), callable_mp(this, &EditorDebuggerSession::_debugger_gone_away));
for (Control *tab : tabs) {
debugger->remove_debugger_tab(tab);
}
@ -126,7 +126,7 @@ EditorDebuggerSession::EditorDebuggerSession(ScriptEditorDebugger *p_debugger) {
debugger->connect("started", callable_mp(this, &EditorDebuggerSession::_started));
debugger->connect("stopped", callable_mp(this, &EditorDebuggerSession::_stopped));
debugger->connect("breaked", callable_mp(this, &EditorDebuggerSession::_breaked));
debugger->connect("tree_exited", callable_mp(this, &EditorDebuggerSession::_debugger_gone_away), CONNECT_ONE_SHOT);
debugger->connect(SceneStringName(tree_exited), callable_mp(this, &EditorDebuggerSession::_debugger_gone_away), CONNECT_ONE_SHOT);
}
EditorDebuggerSession::~EditorDebuggerSession() {

View file

@ -102,7 +102,7 @@ void GradientEdit::_color_changed(const Color &p_color) {
void GradientEdit::set_gradient(const Ref<Gradient> &p_gradient) {
gradient = p_gradient;
gradient->connect("changed", callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
gradient->connect(CoreStringName(changed), callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
}
const Ref<Gradient> &GradientEdit::get_gradient() const {

View file

@ -47,7 +47,6 @@
#include "scene/resources/3d/concave_polygon_shape_3d.h"
#include "scene/resources/3d/convex_polygon_shape_3d.h"
#include "scene/resources/3d/primitive_meshes.h"
#include "scene/scene_string_names.h"
void MeshInstance3DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
@ -607,7 +606,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
add_child(debug_uv_dialog);
debug_uv = memnew(Control);
debug_uv->set_custom_minimum_size(Size2(600, 600) * EDSCALE);
debug_uv->connect("draw", callable_mp(this, &MeshInstance3DEditor::_debug_uv_draw));
debug_uv->connect(SceneStringName(draw), callable_mp(this, &MeshInstance3DEditor::_debug_uv_draw));
debug_uv_dialog->add_child(debug_uv);
}

View file

@ -31,7 +31,6 @@
#include "navigation_obstacle_3d_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
#include "core/core_string_names.h"
#include "core/input/input.h"
#include "core/io/file_access.h"
#include "core/math/geometry_2d.h"

View file

@ -177,8 +177,8 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
void NavigationPolygonEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
button_bake->set_icon(get_theme_icon(SNAME("Bake"), SNAME("EditorIcons")));
button_reset->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
button_bake->set_icon(get_editor_theme_icon(SNAME("Bake")));
button_reset->set_icon(get_editor_theme_icon(SNAME("Reload")));
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
if (rebake_timer) {

View file

@ -124,11 +124,11 @@ constexpr real_t MAX_FOV = 179;
void ViewportNavigationControl::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
if (!is_connected("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited))) {
connect("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited));
if (!is_connected(SceneStringName(mouse_exited), callable_mp(this, &ViewportNavigationControl::_on_mouse_exited))) {
connect(SceneStringName(mouse_exited), callable_mp(this, &ViewportNavigationControl::_on_mouse_exited));
}
if (!is_connected("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered))) {
connect("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered));
if (!is_connected(SceneStringName(mouse_entered), callable_mp(this, &ViewportNavigationControl::_on_mouse_entered))) {
connect(SceneStringName(mouse_entered), callable_mp(this, &ViewportNavigationControl::_on_mouse_entered));
}
} break;
@ -309,8 +309,8 @@ void ViewportRotationControl::_notification(int p_what) {
axis_colors.push_back(get_theme_color(SNAME("axis_z_color"), EditorStringName(Editor)));
queue_redraw();
if (!is_connected("mouse_exited", callable_mp(this, &ViewportRotationControl::_on_mouse_exited))) {
connect("mouse_exited", callable_mp(this, &ViewportRotationControl::_on_mouse_exited));
if (!is_connected(SceneStringName(mouse_exited), callable_mp(this, &ViewportRotationControl::_on_mouse_exited))) {
connect(SceneStringName(mouse_exited), callable_mp(this, &ViewportRotationControl::_on_mouse_exited));
}
} break;
@ -2783,10 +2783,10 @@ void Node3DEditorViewport::_notification(int p_what) {
if (cam != nullptr && cam != previewing) {
//then switch the viewport's camera to the scene's viewport camera
if (previewing != nullptr) {
previewing->disconnect("tree_exited", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->disconnect(SceneStringName(tree_exited), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
}
previewing = cam;
previewing->connect("tree_exited", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->connect(SceneStringName(tree_exited), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), cam->get_camera());
surface->queue_redraw();
}
@ -2991,12 +2991,12 @@ void Node3DEditorViewport::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
surface->connect("draw", callable_mp(this, &Node3DEditorViewport::_draw));
surface->connect("gui_input", callable_mp(this, &Node3DEditorViewport::_sinput));
surface->connect("mouse_entered", callable_mp(this, &Node3DEditorViewport::_surface_mouse_enter));
surface->connect("mouse_exited", callable_mp(this, &Node3DEditorViewport::_surface_mouse_exit));
surface->connect("focus_entered", callable_mp(this, &Node3DEditorViewport::_surface_focus_enter));
surface->connect("focus_exited", callable_mp(this, &Node3DEditorViewport::_surface_focus_exit));
surface->connect(SceneStringName(draw), callable_mp(this, &Node3DEditorViewport::_draw));
surface->connect(SceneStringName(gui_input), callable_mp(this, &Node3DEditorViewport::_sinput));
surface->connect(SceneStringName(mouse_entered), callable_mp(this, &Node3DEditorViewport::_surface_mouse_enter));
surface->connect(SceneStringName(mouse_exited), callable_mp(this, &Node3DEditorViewport::_surface_mouse_exit));
surface->connect(SceneStringName(focus_entered), callable_mp(this, &Node3DEditorViewport::_surface_focus_enter));
surface->connect(SceneStringName(focus_exited), callable_mp(this, &Node3DEditorViewport::_surface_focus_exit));
_init_gizmo_instance(index);
} break;
@ -3705,7 +3705,7 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
_update_navigation_controls_visibility();
if (!p_activate) {
previewing->disconnect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->disconnect(SceneStringName(tree_exiting), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing = nullptr;
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
if (!preview) {
@ -3715,7 +3715,7 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
} else {
previewing = preview;
previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->connect(SceneStringName(tree_exiting), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace
surface->queue_redraw();
}
@ -3727,7 +3727,7 @@ void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
if (!previewing_cinema) {
if (previewing != nullptr) {
previewing->disconnect("tree_exited", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->disconnect(SceneStringName(tree_exited), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
}
previewing = nullptr;
@ -3972,7 +3972,7 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]);
if (Object::cast_to<Camera3D>(pv)) {
previewing = Object::cast_to<Camera3D>(pv);
previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing->connect(SceneStringName(tree_exiting), callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace
surface->queue_redraw();
preview_camera->set_pressed(true);
@ -7817,7 +7817,7 @@ void Node3DEditor::add_control_to_menu_panel(Control *p_control) {
context_toolbar_hbox->add_child(p_control);
context_toolbar_separators[p_control] = sep;
p_control->connect("visibility_changed", callable_mp(this, &Node3DEditor::_update_context_toolbar));
p_control->connect(SceneStringName(visibility_changed), callable_mp(this, &Node3DEditor::_update_context_toolbar));
_update_context_toolbar();
}
@ -7826,7 +7826,7 @@ void Node3DEditor::remove_control_from_menu_panel(Control *p_control) {
ERR_FAIL_NULL(p_control);
ERR_FAIL_COND(p_control->get_parent() != context_toolbar_hbox);
p_control->disconnect("visibility_changed", callable_mp(this, &Node3DEditor::_update_context_toolbar));
p_control->disconnect(SceneStringName(visibility_changed), callable_mp(this, &Node3DEditor::_update_context_toolbar));
VSeparator *sep = context_toolbar_separators[p_control];
context_toolbar_hbox->remove_child(sep);
@ -8737,7 +8737,7 @@ Node3DEditor::Node3DEditor() {
selected = nullptr;
set_process_shortcut_input(true);
add_to_group("_spatial_editor_group");
add_to_group(SceneStringName(_spatial_editor_group));
EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,160,1"));
@ -8774,8 +8774,8 @@ Node3DEditor::Node3DEditor() {
sun_direction->set_custom_minimum_size(Size2(128, 128) * EDSCALE);
sun_direction_center->add_child(sun_direction);
sun_vb->add_margin_child(TTR("Sun Direction"), sun_direction_center);
sun_direction->connect("gui_input", callable_mp(this, &Node3DEditor::_sun_direction_input));
sun_direction->connect("draw", callable_mp(this, &Node3DEditor::_sun_direction_draw));
sun_direction->connect(SceneStringName(gui_input), callable_mp(this, &Node3DEditor::_sun_direction_input));
sun_direction->connect(SceneStringName(draw), callable_mp(this, &Node3DEditor::_sun_direction_draw));
sun_direction->set_default_cursor_shape(CURSOR_MOVE);
sun_direction_shader.instantiate();

View file

@ -33,7 +33,6 @@
#include "editor/editor_node.h"
#include "scene/gui/button.h"
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
void PackedSceneEditor::_on_open_scene_pressed() {
// Using deferred call because changing scene updates the Inspector and thus destroys this plugin.

View file

@ -415,10 +415,10 @@ ParticleProcessMaterialMinMaxPropertyEditor::ParticleProcessMaterialMinMaxProper
range_edit_widget->set_h_size_flags(SIZE_EXPAND_FILL);
range_edit_widget->set_tooltip_text(TTR("Hold Shift to scale around midpoint instead of moving."));
hb->add_child(range_edit_widget);
range_edit_widget->connect(SNAME("draw"), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_range_edit_draw));
range_edit_widget->connect(SNAME("gui_input"), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_range_edit_gui_input));
range_edit_widget->connect(SNAME("mouse_entered"), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_set_mouse_inside).bind(true));
range_edit_widget->connect(SNAME("mouse_exited"), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_set_mouse_inside).bind(false));
range_edit_widget->connect(SceneStringName(draw), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_range_edit_draw));
range_edit_widget->connect(SceneStringName(gui_input), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_range_edit_gui_input));
range_edit_widget->connect(SceneStringName(mouse_entered), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_set_mouse_inside).bind(true));
range_edit_widget->connect(SceneStringName(mouse_exited), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_set_mouse_inside).bind(false));
// Range controls for actual editing. Their min/max may depend on editing mode.
hb = memnew(HBoxContainer);

View file

@ -450,13 +450,13 @@ void Path2DEditor::edit(Node *p_path2d) {
if (p_path2d) {
node = Object::cast_to<Path2D>(p_path2d);
if (!node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->connect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
if (!node->is_connected(SceneStringName(visibility_changed), callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->connect(SceneStringName(visibility_changed), callable_mp(this, &Path2DEditor::_node_visibility_changed));
}
} else {
// The node may have been deleted at this point.
if (node && node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->disconnect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
if (node && node->is_connected(SceneStringName(visibility_changed), callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->disconnect(SceneStringName(visibility_changed), callable_mp(this, &Path2DEditor::_node_visibility_changed));
}
node = nullptr;
}

View file

@ -650,14 +650,14 @@ void Path3DEditorPlugin::edit(Object *p_object) {
path = Object::cast_to<Path3D>(p_object);
if (path) {
if (path->get_curve().is_valid()) {
path->get_curve()->emit_signal(SNAME("changed"));
path->get_curve()->emit_signal(CoreStringName(changed));
}
}
} else {
Path3D *pre = path;
path = nullptr;
if (pre) {
pre->get_curve()->emit_signal(SNAME("changed"));
pre->get_curve()->emit_signal(CoreStringName(changed));
}
}
@ -679,7 +679,7 @@ void Path3DEditorPlugin::make_visible(bool p_visible) {
Path3D *pre = path;
path = nullptr;
if (pre && pre->get_curve().is_valid()) {
pre->get_curve()->emit_signal(SNAME("changed"));
pre->get_curve()->emit_signal(CoreStringName(changed));
}
}
}
@ -802,7 +802,7 @@ void Path3DEditorPlugin::_notification(int p_what) {
// FIXME: This can trigger theme updates when the nodes that we want to update are not yet available.
// The toolbar should be extracted to a dedicated control and theme updates should be handled through
// the notification.
Node3DEditor::get_singleton()->connect("theme_changed", callable_mp(this, &Path3DEditorPlugin::_update_theme));
Node3DEditor::get_singleton()->connect(SceneStringName(theme_changed), callable_mp(this, &Path3DEditorPlugin::_update_theme));
} break;
}
}

View file

@ -1534,9 +1534,9 @@ Polygon2DEditor::Polygon2DEditor() {
uv_panner.instantiate();
uv_panner->set_callbacks(callable_mp(this, &Polygon2DEditor::_uv_pan_callback), callable_mp(this, &Polygon2DEditor::_uv_zoom_callback));
uv_edit_draw->connect("draw", callable_mp(this, &Polygon2DEditor::_uv_draw));
uv_edit_draw->connect("gui_input", callable_mp(this, &Polygon2DEditor::_uv_input));
uv_edit_draw->connect("focus_exited", callable_mp(uv_panner.ptr(), &ViewPanner::release_pan_key));
uv_edit_draw->connect(SceneStringName(draw), callable_mp(this, &Polygon2DEditor::_uv_draw));
uv_edit_draw->connect(SceneStringName(gui_input), callable_mp(this, &Polygon2DEditor::_uv_input));
uv_edit_draw->connect(SceneStringName(focus_exited), callable_mp(uv_panner.ptr(), &ViewPanner::release_pan_key));
uv_edit_draw->set_focus_mode(FOCUS_CLICK);
uv_draw_zoom = 1.0;
point_drag_index = -1;

View file

@ -64,7 +64,6 @@
#include "editor/window_wrapper.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
#include "script_text_editor.h"
#include "servers/display_server.h"
#include "text_editor.h"
@ -425,7 +424,7 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
search_box->connect("text_changed", callable_mp(this, &ScriptEditorQuickOpen::_text_changed));
search_box->connect("gui_input", callable_mp(this, &ScriptEditorQuickOpen::_sbox_input));
search_box->connect(SceneStringName(gui_input), callable_mp(this, &ScriptEditorQuickOpen::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
set_ok_button_text(TTR("Open"));
@ -1714,7 +1713,7 @@ void ScriptEditor::_notification(int p_what) {
filter_scripts->set_right_icon(get_editor_theme_icon(SNAME("Search")));
filter_methods->set_right_icon(get_editor_theme_icon(SNAME("Search")));
filename->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
filename->add_theme_style_override("normal", get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit")));
recent_scripts->reset_size();
@ -1725,7 +1724,7 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
// Can't set own styles in NOTIFICATION_THEME_CHANGED, so for now this will do.
add_theme_style_override("panel", get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
add_theme_style_override("panel", get_theme_stylebox(SNAME("ScriptEditorPanel"), EditorStringName(EditorStyles)));
get_tree()->connect("tree_changed", callable_mp(this, &ScriptEditor::_tree_changed));
InspectorDock::get_singleton()->connect("request_help", callable_mp(this, &ScriptEditor::_help_class_open));
@ -4000,7 +3999,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
filename = memnew(Label);
filename->set_clip_text(true);
filename->set_h_size_flags(SIZE_EXPAND_FILL);
filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("normal"), SNAME("LineEdit")));
filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(CoreStringName(normal), SNAME("LineEdit")));
buttons_hbox->add_child(filename);
members_overview_alphabeta_sort_button = memnew(Button);

View file

@ -2222,7 +2222,7 @@ void ScriptTextEditor::_enable_code_editor() {
code_editor->get_text_editor()->connect("gutter_added", callable_mp(this, &ScriptTextEditor::_update_gutter_indexes));
code_editor->get_text_editor()->connect("gutter_removed", callable_mp(this, &ScriptTextEditor::_update_gutter_indexes));
code_editor->get_text_editor()->connect("gutter_clicked", callable_mp(this, &ScriptTextEditor::_gutter_clicked));
code_editor->get_text_editor()->connect("gui_input", callable_mp(this, &ScriptTextEditor::_text_edit_gui_input));
code_editor->get_text_editor()->connect(SceneStringName(gui_input), callable_mp(this, &ScriptTextEditor::_text_edit_gui_input));
code_editor->show_toggle_scripts_button();
_update_gutter_indexes();

View file

@ -50,7 +50,6 @@
#include "scene/resources/3d/capsule_shape_3d.h"
#include "scene/resources/skeleton_profile.h"
#include "scene/resources/surface_tool.h"
#include "scene/scene_string_names.h"
void BoneTransformEditor::create_editors() {
section = memnew(EditorInspectorSection);

View file

@ -596,8 +596,8 @@ Sprite2DEditor::Sprite2DEditor() {
VBoxContainer *vb = memnew(VBoxContainer);
debug_uv_dialog->add_child(vb);
debug_uv = memnew(Panel);
debug_uv->connect("gui_input", callable_mp(this, &Sprite2DEditor::_debug_uv_input));
debug_uv->connect("draw", callable_mp(this, &Sprite2DEditor::_debug_uv_draw));
debug_uv->connect(SceneStringName(gui_input), callable_mp(this, &Sprite2DEditor::_debug_uv_input));
debug_uv->connect(SceneStringName(draw), callable_mp(this, &Sprite2DEditor::_debug_uv_draw));
debug_uv->set_custom_minimum_size(Size2(800, 500) * EDSCALE);
debug_uv->set_clip_contents(true);
vb->add_margin_child(TTR("Preview:"), debug_uv, true);

View file

@ -1635,11 +1635,11 @@ void SpriteFramesEditor::_remove_sprite_node() {
if (animated_sprite->is_connected("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit))) {
animated_sprite->disconnect("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit));
}
if (animated_sprite->is_connected("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
animated_sprite->disconnect("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation));
if (animated_sprite->is_connected(SceneStringName(animation_changed), callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
animated_sprite->disconnect(SceneStringName(animation_changed), callable_mp(this, &SpriteFramesEditor::_sync_animation));
}
if (animated_sprite->is_connected("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
animated_sprite->disconnect("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
if (animated_sprite->is_connected(SceneStringName(animation_finished), callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
animated_sprite->disconnect(SceneStringName(animation_finished), callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
}
animated_sprite = nullptr;
}
@ -1662,11 +1662,11 @@ void SpriteFramesEditor::_fetch_sprite_node() {
if (!animated_sprite->is_connected("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit))) {
animated_sprite->connect("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit));
}
if (!animated_sprite->is_connected("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
animated_sprite->connect("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation), CONNECT_DEFERRED);
if (!animated_sprite->is_connected(SceneStringName(animation_changed), callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
animated_sprite->connect(SceneStringName(animation_changed), callable_mp(this, &SpriteFramesEditor::_sync_animation), CONNECT_DEFERRED);
}
if (!animated_sprite->is_connected("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
animated_sprite->connect("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
if (!animated_sprite->is_connected(SceneStringName(animation_finished), callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
animated_sprite->connect(SceneStringName(animation_finished), callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
}
show_node_edit = true;
}
@ -2005,7 +2005,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
frame_list->set_icon_mode(ItemList::ICON_MODE_TOP);
frame_list->set_max_text_lines(2);
SET_DRAG_FORWARDING_GCD(frame_list, SpriteFramesEditor);
frame_list->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_frame_list_gui_input));
frame_list->connect(SceneStringName(gui_input), callable_mp(this, &SpriteFramesEditor::_frame_list_gui_input));
// HACK: The item_selected signal is emitted before the Frame Duration spinbox loses focus and applies the change.
frame_list->connect("multi_selected", callable_mp(this, &SpriteFramesEditor::_frame_list_item_selected), CONNECT_DEFERRED);
@ -2124,11 +2124,11 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
split_sheet_preview->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS);
split_sheet_preview->connect("draw", callable_mp(this, &SpriteFramesEditor::_sheet_preview_draw));
split_sheet_preview->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));
split_sheet_preview->connect(SceneStringName(draw), callable_mp(this, &SpriteFramesEditor::_sheet_preview_draw));
split_sheet_preview->connect(SceneStringName(gui_input), callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));
split_sheet_scroll = memnew(ScrollContainer);
split_sheet_scroll->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_scroll_input));
split_sheet_scroll->connect(SceneStringName(gui_input), callable_mp(this, &SpriteFramesEditor::_sheet_scroll_input));
split_sheet_panel->add_child(split_sheet_scroll);
CenterContainer *cc = memnew(CenterContainer);
cc->add_child(split_sheet_preview);

View file

@ -603,7 +603,7 @@ TextEditor::TextEditor() {
update_settings();
code_editor->get_text_editor()->set_context_menu_enabled(false);
code_editor->get_text_editor()->connect("gui_input", callable_mp(this, &TextEditor::_text_edit_gui_input));
code_editor->get_text_editor()->connect(SceneStringName(gui_input), callable_mp(this, &TextEditor::_text_edit_gui_input));
context_menu = memnew(PopupMenu);
add_child(context_menu);

View file

@ -436,7 +436,7 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLa
}
void ShaderTextEditor::_validate_script() {
emit_signal(SNAME("script_changed")); // Ensure to notify that it changed, so it is applied
emit_signal(CoreStringName(script_changed)); // Ensure to notify that it changed, so it is applied
String code;
@ -1098,7 +1098,7 @@ TextShaderEditor::TextShaderEditor() {
code_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
code_editor->connect("show_warnings_panel", callable_mp(this, &TextShaderEditor::_show_warnings_panel));
code_editor->connect("script_changed", callable_mp(this, &TextShaderEditor::apply_shaders));
code_editor->connect(CoreStringName(script_changed), callable_mp(this, &TextShaderEditor::apply_shaders));
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextShaderEditor::_editor_settings_changed));
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextShaderEditor::_project_settings_changed));
@ -1106,7 +1106,7 @@ TextShaderEditor::TextShaderEditor() {
code_editor->get_text_editor()->set_context_menu_enabled(false);
code_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
code_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
code_editor->get_text_editor()->connect("gui_input", callable_mp(this, &TextShaderEditor::_text_edit_gui_input));
code_editor->get_text_editor()->connect(SceneStringName(gui_input), callable_mp(this, &TextShaderEditor::_text_edit_gui_input));
code_editor->update_editor_settings();

View file

@ -147,7 +147,7 @@ Texture3DEditor::Texture3DEditor() {
texture_rect = memnew(Control);
texture_rect->set_mouse_filter(MOUSE_FILTER_IGNORE);
add_child(texture_rect);
texture_rect->connect("draw", callable_mp(this, &Texture3DEditor::_texture_rect_draw));
texture_rect->connect(SceneStringName(draw), callable_mp(this, &Texture3DEditor::_texture_rect_draw));
layer = memnew(SpinBox);
layer->set_step(1);

View file

@ -223,7 +223,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
texture_rect = memnew(Control);
texture_rect->set_mouse_filter(MOUSE_FILTER_IGNORE);
add_child(texture_rect);
texture_rect->connect("draw", callable_mp(this, &TextureLayeredEditor::_texture_rect_draw));
texture_rect->connect(SceneStringName(draw), callable_mp(this, &TextureLayeredEditor::_texture_rect_draw));
layer = memnew(SpinBox);
layer->set_step(1);

View file

@ -881,13 +881,13 @@ void TextureRegionEditor::_node_removed(Node *p_node) {
void TextureRegionEditor::_clear_edited_object() {
if (node_sprite_2d) {
node_sprite_2d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
node_sprite_2d->disconnect(SceneStringName(texture_changed), callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (node_sprite_3d) {
node_sprite_3d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
node_sprite_3d->disconnect(SceneStringName(texture_changed), callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (node_ninepatch) {
node_ninepatch->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
node_ninepatch->disconnect(SceneStringName(texture_changed), callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (res_stylebox.is_valid()) {
res_stylebox->disconnect_changed(callable_mp(this, &TextureRegionEditor::_texture_changed));
@ -924,7 +924,7 @@ void TextureRegionEditor::edit(Object *p_obj) {
if (is_resource) {
Object::cast_to<Resource>(p_obj)->connect_changed(callable_mp(this, &TextureRegionEditor::_texture_changed));
} else {
p_obj->connect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
p_obj->connect(SceneStringName(texture_changed), callable_mp(this, &TextureRegionEditor::_texture_changed));
}
_edit_region();
}
@ -1212,14 +1212,14 @@ TextureRegionEditor::TextureRegionEditor() {
vb->add_child(texture_preview);
texture_preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);
texture_preview->set_clip_contents(true);
texture_preview->connect("draw", callable_mp(this, &TextureRegionEditor::_texture_preview_draw));
texture_preview->connect(SceneStringName(draw), callable_mp(this, &TextureRegionEditor::_texture_preview_draw));
texture_overlay = memnew(Panel);
texture_preview->add_child(texture_overlay);
texture_overlay->set_focus_mode(Control::FOCUS_CLICK);
texture_overlay->connect("draw", callable_mp(this, &TextureRegionEditor::_texture_overlay_draw));
texture_overlay->connect("gui_input", callable_mp(this, &TextureRegionEditor::_texture_overlay_input));
texture_overlay->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
texture_overlay->connect(SceneStringName(draw), callable_mp(this, &TextureRegionEditor::_texture_overlay_draw));
texture_overlay->connect(SceneStringName(gui_input), callable_mp(this, &TextureRegionEditor::_texture_overlay_input));
texture_overlay->connect(SceneStringName(focus_exited), callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
HBoxContainer *zoom_hb = memnew(HBoxContainer);
texture_overlay->add_child(zoom_hb);

View file

@ -2067,7 +2067,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_theme_item_vb->add_child(edit_theme_item_label);
theme_item_name = memnew(LineEdit);
edit_theme_item_vb->add_child(theme_item_name);
theme_item_name->connect("gui_input", callable_mp(this, &ThemeItemEditorDialog::_edit_theme_item_gui_input));
theme_item_name->connect(SceneStringName(gui_input), callable_mp(this, &ThemeItemEditorDialog::_edit_theme_item_gui_input));
edit_theme_item_dialog->connect("confirmed", callable_mp(this, &ThemeItemEditorDialog::_confirm_edit_theme_item));
// Import Items tab.
@ -3150,8 +3150,8 @@ void ThemeTypeEditor::_font_item_changed(Ref<Font> p_value, String p_item_name)
ur->add_undo_method(*edited_theme, "set_font", p_item_name, edited_type, Ref<Font>());
}
ur->add_do_method(this, "call_deferred", "_update_type_items");
ur->add_undo_method(this, "call_deferred", "_update_type_items");
ur->add_do_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->add_undo_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->commit_action();
}
@ -3167,8 +3167,8 @@ void ThemeTypeEditor::_icon_item_changed(Ref<Texture2D> p_value, String p_item_n
ur->add_undo_method(*edited_theme, "set_icon", p_item_name, edited_type, Ref<Texture2D>());
}
ur->add_do_method(this, "call_deferred", "_update_type_items");
ur->add_undo_method(this, "call_deferred", "_update_type_items");
ur->add_do_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->add_undo_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->commit_action();
}
@ -3187,8 +3187,8 @@ void ThemeTypeEditor::_stylebox_item_changed(Ref<StyleBox> p_value, String p_ite
ur->add_do_method(this, "_change_pinned_stylebox");
ur->add_undo_method(this, "_change_pinned_stylebox");
ur->add_do_method(this, "call_deferred", "_update_type_items");
ur->add_undo_method(this, "call_deferred", "_update_type_items");
ur->add_do_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->add_undo_method(this, CoreStringName(call_deferred), "_update_type_items");
ur->commit_action();
}
@ -3506,7 +3506,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
type_variation_hb->add_child(type_variation_edit);
type_variation_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
type_variation_edit->connect("text_changed", callable_mp(this, &ThemeTypeEditor::_type_variation_changed));
type_variation_edit->connect("focus_exited", callable_mp(this, &ThemeTypeEditor::_update_type_items));
type_variation_edit->connect(SceneStringName(focus_exited), callable_mp(this, &ThemeTypeEditor::_update_type_items));
type_variation_button = memnew(Button);
type_variation_hb->add_child(type_variation_button);
type_variation_button->set_tooltip_text(TTR("Select the variation base type from a list of available types."));

View file

@ -201,7 +201,7 @@ void ThemeEditorPreview::_notification(int p_what) {
set_process(true);
}
connect("visibility_changed", callable_mp(this, &ThemeEditorPreview::_preview_visibility_changed));
connect(SceneStringName(visibility_changed), callable_mp(this, &ThemeEditorPreview::_preview_visibility_changed));
} break;
case NOTIFICATION_READY: {
@ -279,9 +279,9 @@ ThemeEditorPreview::ThemeEditorPreview() {
picker_overlay = memnew(Control);
add_preview_overlay(picker_overlay);
picker_overlay->connect("draw", callable_mp(this, &ThemeEditorPreview::_draw_picker_overlay));
picker_overlay->connect("gui_input", callable_mp(this, &ThemeEditorPreview::_gui_input_picker_overlay));
picker_overlay->connect("mouse_exited", callable_mp(this, &ThemeEditorPreview::_reset_picker_overlay));
picker_overlay->connect(SceneStringName(draw), callable_mp(this, &ThemeEditorPreview::_draw_picker_overlay));
picker_overlay->connect(SceneStringName(gui_input), callable_mp(this, &ThemeEditorPreview::_gui_input_picker_overlay));
picker_overlay->connect(SceneStringName(mouse_exited), callable_mp(this, &ThemeEditorPreview::_reset_picker_overlay));
}
void DefaultThemeEditorPreview::_notification(int p_what) {

View file

@ -627,8 +627,8 @@ TileAtlasView::TileAtlasView() {
center_container = memnew(CenterContainer);
center_container->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
center_container->set_anchors_preset(Control::PRESET_CENTER);
center_container->connect("gui_input", callable_mp(this, &TileAtlasView::gui_input));
center_container->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
center_container->connect(SceneStringName(gui_input), callable_mp(this, &TileAtlasView::gui_input));
center_container->connect(SceneStringName(focus_exited), callable_mp(panner.ptr(), &ViewPanner::release_pan_key));
center_container->set_focus_mode(FOCUS_CLICK);
panel->add_child(center_container);
@ -664,14 +664,14 @@ TileAtlasView::TileAtlasView() {
base_tiles_root_control = memnew(Control);
base_tiles_root_control->set_mouse_filter(Control::MOUSE_FILTER_PASS);
base_tiles_root_control->set_v_size_flags(Control::SIZE_EXPAND_FILL);
base_tiles_root_control->connect("gui_input", callable_mp(this, &TileAtlasView::_base_tiles_root_control_gui_input));
base_tiles_root_control->connect(SceneStringName(gui_input), callable_mp(this, &TileAtlasView::_base_tiles_root_control_gui_input));
left_vbox->add_child(base_tiles_root_control);
background_left = memnew(Control);
background_left->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
background_left->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT);
background_left->set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
background_left->connect("draw", callable_mp(this, &TileAtlasView::_draw_background_left));
background_left->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_background_left));
base_tiles_root_control->add_child(background_left);
base_tiles_drawing_root = memnew(Control);
@ -682,19 +682,19 @@ TileAtlasView::TileAtlasView() {
base_tiles_draw = memnew(Control);
base_tiles_draw->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
base_tiles_draw->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
base_tiles_draw->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles));
base_tiles_draw->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_base_tiles));
base_tiles_drawing_root->add_child(base_tiles_draw);
base_tiles_texture_grid = memnew(Control);
base_tiles_texture_grid->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
base_tiles_texture_grid->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
base_tiles_texture_grid->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_texture_grid));
base_tiles_texture_grid->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_base_tiles_texture_grid));
base_tiles_drawing_root->add_child(base_tiles_texture_grid);
base_tiles_shape_grid = memnew(Control);
base_tiles_shape_grid->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
base_tiles_shape_grid->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
base_tiles_shape_grid->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_shape_grid));
base_tiles_shape_grid->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_base_tiles_shape_grid));
base_tiles_drawing_root->add_child(base_tiles_shape_grid);
// Alternative tiles.
@ -707,14 +707,14 @@ TileAtlasView::TileAtlasView() {
alternative_tiles_root_control = memnew(Control);
alternative_tiles_root_control->set_mouse_filter(Control::MOUSE_FILTER_PASS);
alternative_tiles_root_control->set_v_size_flags(Control::SIZE_EXPAND_FILL);
alternative_tiles_root_control->connect("gui_input", callable_mp(this, &TileAtlasView::_alternative_tiles_root_control_gui_input));
alternative_tiles_root_control->connect(SceneStringName(gui_input), callable_mp(this, &TileAtlasView::_alternative_tiles_root_control_gui_input));
right_vbox->add_child(alternative_tiles_root_control);
background_right = memnew(Control);
background_right->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
background_right->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT);
background_right->set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
background_right->connect("draw", callable_mp(this, &TileAtlasView::_draw_background_right));
background_right->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_background_right));
alternative_tiles_root_control->add_child(background_right);
alternative_tiles_drawing_root = memnew(Control);
@ -725,7 +725,7 @@ TileAtlasView::TileAtlasView() {
alternatives_draw = memnew(Control);
alternatives_draw->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
alternatives_draw->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
alternatives_draw->connect("draw", callable_mp(this, &TileAtlasView::_draw_alternatives));
alternatives_draw->connect(SceneStringName(draw), callable_mp(this, &TileAtlasView::_draw_alternatives));
alternative_tiles_drawing_root->add_child(alternatives_draw);
}

View file

@ -934,8 +934,8 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
base_control = memnew(Control);
base_control->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
base_control->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
base_control->connect("draw", callable_mp(this, &GenericTilePolygonEditor::_base_control_draw));
base_control->connect("gui_input", callable_mp(this, &GenericTilePolygonEditor::_base_control_gui_input));
base_control->connect(SceneStringName(draw), callable_mp(this, &GenericTilePolygonEditor::_base_control_draw));
base_control->connect(SceneStringName(gui_input), callable_mp(this, &GenericTilePolygonEditor::_base_control_gui_input));
base_control->set_clip_contents(true);
base_control->set_focus_mode(Control::FOCUS_CLICK);
root->add_child(base_control);

View file

@ -2178,7 +2178,7 @@ void TileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) {
TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
CanvasItemEditor::get_singleton()
->get_viewport_control()
->connect("mouse_exited", callable_mp(this, &TileMapLayerEditorTilesPlugin::_mouse_exited_viewport));
->connect(SceneStringName(mouse_exited), callable_mp(this, &TileMapLayerEditorTilesPlugin::_mouse_exited_viewport));
// --- Shortcuts ---
ED_SHORTCUT("tiles_editor/cut", TTR("Cut"), KeyModifierMask::CMD_OR_CTRL | Key::X);
@ -2358,9 +2358,9 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
// FIXME: This can trigger theme updates when the nodes that we want to update are not yet available.
// The toolbar should be extracted to a dedicated control and theme updates should be handled through
// the notification.
tiles_bottom_panel->connect("theme_changed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_theme));
tiles_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_stop_dragging));
tiles_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tab_changed));
tiles_bottom_panel->connect(SceneStringName(theme_changed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_theme));
tiles_bottom_panel->connect(SceneStringName(visibility_changed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_stop_dragging));
tiles_bottom_panel->connect(SceneStringName(visibility_changed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tab_changed));
tiles_bottom_panel->set_name(TTR("Tiles"));
missing_source_label = memnew(Label);
@ -2413,7 +2413,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
sources_list->connect("item_selected", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_source_display).unbind(1));
sources_list->connect("item_selected", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::set_sources_lists_current));
sources_list->connect("item_activated", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::display_tile_set_editor_panel).unbind(1));
sources_list->connect("visibility_changed", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->connect(SceneStringName(visibility_changed), callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->add_user_signal(MethodInfo("sort_request"));
sources_list->connect("sort_request", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_tile_set_sources_list));
split_container_left_side->add_child(sources_list);
@ -2429,15 +2429,15 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
atlas_sources_split_container->add_child(tile_atlas_view);
tile_atlas_control = memnew(Control);
tile_atlas_control->connect("draw", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_draw));
tile_atlas_control->connect("mouse_exited", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_mouse_exited));
tile_atlas_control->connect("gui_input", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_gui_input));
tile_atlas_control->connect(SceneStringName(draw), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_draw));
tile_atlas_control->connect(SceneStringName(mouse_exited), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_mouse_exited));
tile_atlas_control->connect(SceneStringName(gui_input), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_atlas_control_gui_input));
tile_atlas_view->add_control_over_atlas_tiles(tile_atlas_control);
alternative_tiles_control = memnew(Control);
alternative_tiles_control->connect("draw", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_draw));
alternative_tiles_control->connect("mouse_exited", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_mouse_exited));
alternative_tiles_control->connect("gui_input", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_gui_input));
alternative_tiles_control->connect(SceneStringName(draw), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_draw));
alternative_tiles_control->connect(SceneStringName(mouse_exited), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_mouse_exited));
alternative_tiles_control->connect(SceneStringName(gui_input), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tile_alternatives_control_gui_input));
tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control);
// Scenes collection source.
@ -2464,7 +2464,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
// --- Bottom panel patterns ---
patterns_bottom_panel = memnew(VBoxContainer);
patterns_bottom_panel->set_name(TTR("Patterns"));
patterns_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_tab_changed));
patterns_bottom_panel->connect(SceneStringName(visibility_changed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_tab_changed));
int thumbnail_size = 64;
patterns_item_list = memnew(ItemList);
@ -2475,7 +2475,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
patterns_item_list->set_max_text_lines(2);
patterns_item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
patterns_item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
patterns_item_list->connect("gui_input", callable_mp(this, &TileMapLayerEditorTilesPlugin::_patterns_item_list_gui_input));
patterns_item_list->connect(SceneStringName(gui_input), callable_mp(this, &TileMapLayerEditorTilesPlugin::_patterns_item_list_gui_input));
patterns_item_list->connect("item_selected", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1));
patterns_item_list->connect("item_activated", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1));
patterns_item_list->connect("empty_clicked", callable_mp(this, &TileMapLayerEditorTilesPlugin::patterns_item_list_empty_clicked));
@ -3512,7 +3512,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
// FIXME: This can trigger theme updates when the nodes that we want to update are not yet available.
// The toolbar should be extracted to a dedicated control and theme updates should be handled through
// the notification.
main_vbox_container->connect("theme_changed", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_theme));
main_vbox_container->connect(SceneStringName(theme_changed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_theme));
main_vbox_container->set_name(TTR("Terrains"));
HSplitContainer *tilemap_tab_terrains = memnew(HSplitContainer);
@ -4355,8 +4355,8 @@ void TileMapLayerEditor::edit(Object *p_edited) {
// Disconnect to changes.
TileMapLayer *tile_map_layer = _get_edited_layer();
if (tile_map_layer) {
tile_map_layer->disconnect("changed", callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
tile_map_layer->disconnect("visibility_changed", callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
tile_map_layer->disconnect(CoreStringName(changed), callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
tile_map_layer->disconnect(SceneStringName(visibility_changed), callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
}
// Update the edited layer.
@ -4367,9 +4367,9 @@ void TileMapLayerEditor::edit(Object *p_edited) {
tile_map_layer = _get_edited_layer();
// Connect to changes.
if (!tile_map_layer->is_connected("changed", callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed))) {
tile_map_layer->connect("changed", callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
tile_map_layer->connect("visibility_changed", callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
if (!tile_map_layer->is_connected(CoreStringName(changed), callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed))) {
tile_map_layer->connect(CoreStringName(changed), callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
tile_map_layer->connect(SceneStringName(visibility_changed), callable_mp(this, &TileMapLayerEditor::_tile_map_layer_changed));
}
} else {
edited_tile_map_layer_id = ObjectID();

View file

@ -50,7 +50,6 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tab_container.h"
#include "core/core_string_names.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
@ -66,7 +65,7 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::set_id(int p_id) {
int previous_source = source_id;
source_id = p_id; // source_id must be updated before, because it's used by the source list update.
tile_set->set_source_id(previous_source, p_id);
emit_signal(SNAME("changed"), "id");
emit_signal(CoreStringName(changed), "id");
}
int TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::get_id() const {
@ -86,7 +85,7 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_set(const StringN
bool valid = false;
tile_set_atlas_source->set(name, p_value, &valid);
if (valid) {
emit_signal(SNAME("changed"), String(name).utf8().get_data());
emit_signal(CoreStringName(changed), String(name).utf8().get_data());
}
return valid;
}
@ -179,14 +178,14 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
tile_set_atlas_source->move_tile_in_atlas(coords, as_vector2i);
tiles.clear();
tiles.insert({ as_vector2i, 0 });
emit_signal(SNAME("changed"), "atlas_coords");
emit_signal(CoreStringName(changed), "atlas_coords");
return true;
} else if (p_name == "size_in_atlas") {
Vector2i as_vector2i = Vector2i(p_value);
bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, as_vector2i, tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
ERR_FAIL_COND_V_EDMSG(!has_room_for_tile, false, "Invalid size or not enough room in the atlas for the tile.");
tile_set_atlas_source->move_tile_in_atlas(coords, TileSetSource::INVALID_ATLAS_COORDS, as_vector2i);
emit_signal(SNAME("changed"), "size_in_atlas");
emit_signal(CoreStringName(changed), "size_in_atlas");
return true;
}
} else if (alternative > 0) {
@ -205,7 +204,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
tiles.insert({ coords, as_int }); // tiles must be updated before.
tile_set_atlas_source->set_alternative_tile_id(coords, previous_alternative_tile, as_int);
emit_signal(SNAME("changed"), "alternative_id");
emit_signal(CoreStringName(changed), "alternative_id");
return true;
}
}
@ -232,7 +231,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
tile_set_atlas_source->set_tile_animation_columns(tile.tile, p_value);
}
}
emit_signal(SNAME("changed"), "animation_columns");
emit_signal(CoreStringName(changed), "animation_columns");
return true;
} else if (p_name == "animation_separation") {
for (TileSelection tile : tiles) {
@ -243,19 +242,19 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
tile_set_atlas_source->set_tile_animation_separation(tile.tile, p_value);
}
}
emit_signal(SNAME("changed"), "animation_separation");
emit_signal(CoreStringName(changed), "animation_separation");
return true;
} else if (p_name == "animation_speed") {
for (TileSelection tile : tiles) {
tile_set_atlas_source->set_tile_animation_speed(tile.tile, p_value);
}
emit_signal(SNAME("changed"), "animation_speed");
emit_signal(CoreStringName(changed), "animation_speed");
return true;
} else if (p_name == "animation_mode") {
for (TileSelection tile : tiles) {
tile_set_atlas_source->set_tile_animation_mode(tile.tile, VariantCaster<TileSetAtlasSource::TileAnimationMode>::cast(p_value));
}
emit_signal(SNAME("changed"), "animation_mode");
emit_signal(CoreStringName(changed), "animation_mode");
return true;
} else if (p_name == "animation_frames_count") {
for (TileSelection tile : tiles) {
@ -272,7 +271,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
}
}
notify_property_list_changed();
emit_signal(SNAME("changed"), "animation_separation");
emit_signal(CoreStringName(changed), "animation_separation");
return true;
} else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) {
for (TileSelection tile : tiles) {
@ -304,7 +303,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
}
if (any_valid) {
emit_signal(SNAME("changed"), String(p_name).utf8().get_data());
emit_signal(CoreStringName(changed), String(p_name).utf8().get_data());
}
return any_valid;
@ -2551,7 +2550,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
// Tile inspector.
tile_proxy_object = memnew(AtlasTileProxyObject(this));
tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_proxy_object_changed));
tile_proxy_object->connect(CoreStringName(changed), callable_mp(this, &TileSetAtlasSourceEditor::_tile_proxy_object_changed));
tile_inspector = memnew(EditorInspector);
tile_inspector->set_v_size_flags(SIZE_EXPAND_FILL);
@ -2586,7 +2585,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_data_editors_vbox->add_child(tile_data_editors_label);
tile_data_editor_dropdown_button = memnew(Button);
tile_data_editor_dropdown_button->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_draw));
tile_data_editor_dropdown_button->connect(SceneStringName(draw), callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_draw));
tile_data_editor_dropdown_button->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_pressed));
tile_data_editors_vbox->add_child(tile_data_editor_dropdown_button);
tile_data_editor_dropdown_button->add_child(tile_data_editors_popup);
@ -2605,7 +2604,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
// Atlas source inspector.
atlas_source_proxy_object = memnew(TileSetAtlasSourceProxyObject());
atlas_source_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed));
atlas_source_proxy_object->connect(CoreStringName(changed), callable_mp(this, &TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed));
atlas_source_inspector = memnew(EditorInspector);
atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL);
@ -2699,13 +2698,13 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_atlas_view->add_child(empty_base_tile_popup_menu);
tile_atlas_control = memnew(TileAtlasControl(this));
tile_atlas_control->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_draw));
tile_atlas_control->connect("mouse_exited", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_mouse_exited));
tile_atlas_control->connect("gui_input", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_gui_input));
tile_atlas_control->connect(SceneStringName(draw), callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_draw));
tile_atlas_control->connect(SceneStringName(mouse_exited), callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_mouse_exited));
tile_atlas_control->connect(SceneStringName(gui_input), callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_gui_input));
tile_atlas_view->add_control_over_atlas_tiles(tile_atlas_control);
tile_atlas_control_unscaled = memnew(Control);
tile_atlas_control_unscaled->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw));
tile_atlas_control_unscaled->connect(SceneStringName(draw), callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw));
tile_atlas_view->add_control_over_atlas_tiles(tile_atlas_control_unscaled, false);
tile_atlas_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
@ -2715,13 +2714,13 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_atlas_view->add_child(alternative_tile_popup_menu);
alternative_tiles_control = memnew(Control);
alternative_tiles_control->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_draw));
alternative_tiles_control->connect("mouse_exited", callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_mouse_exited));
alternative_tiles_control->connect("gui_input", callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input));
alternative_tiles_control->connect(SceneStringName(draw), callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_draw));
alternative_tiles_control->connect(SceneStringName(mouse_exited), callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_mouse_exited));
alternative_tiles_control->connect(SceneStringName(gui_input), callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input));
tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control);
alternative_tiles_control_unscaled = memnew(Control);
alternative_tiles_control_unscaled->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw));
alternative_tiles_control_unscaled->connect(SceneStringName(draw), callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw));
tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control_unscaled, false);
alternative_tiles_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);

View file

@ -863,7 +863,7 @@ TileSetEditor::TileSetEditor() {
sources_list->set_v_size_flags(SIZE_EXPAND_FILL);
sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected));
sources_list->connect("item_selected", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::set_sources_lists_current));
sources_list->connect("visibility_changed", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->connect(SceneStringName(visibility_changed), callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->add_user_signal(MethodInfo("sort_request"));
sources_list->connect("sort_request", callable_mp(this, &TileSetEditor::_update_sources_list).bind(-1));
sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
@ -946,7 +946,7 @@ TileSetEditor::TileSetEditor() {
patterns_item_list->set_max_text_lines(2);
patterns_item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
patterns_item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
patterns_item_list->connect("gui_input", callable_mp(this, &TileSetEditor::_patterns_item_list_gui_input));
patterns_item_list->connect(SceneStringName(gui_input), callable_mp(this, &TileSetEditor::_patterns_item_list_gui_input));
main_vb->add_child(patterns_item_list);
patterns_item_list->hide();

View file

@ -44,8 +44,6 @@
#include "scene/gui/label.h"
#include "scene/gui/split_container.h"
#include "core/core_string_names.h"
void TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::set_id(int p_id) {
ERR_FAIL_COND(p_id < 0);
if (source_id == p_id) {
@ -56,7 +54,7 @@ void TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::se
int previous_source = source_id;
source_id = p_id; // source_id must be updated before, because it's used by the source list update.
tile_set->set_source_id(previous_source, p_id);
emit_signal(SNAME("changed"), "id");
emit_signal(CoreStringName(changed), "id");
}
int TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::get_id() {
@ -72,7 +70,7 @@ bool TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::_s
bool valid = false;
tile_set_scenes_collection_source->set(name, p_value, &valid);
if (valid) {
emit_signal(SNAME("changed"), String(name).utf8().get_data());
emit_signal(CoreStringName(changed), String(name).utf8().get_data());
}
return valid;
}
@ -146,7 +144,7 @@ bool TileSetScenesCollectionSourceEditor::SceneTileProxyObject::_set(const Strin
ERR_FAIL_COND_V(tile_set_scenes_collection_source->has_scene_tile_id(as_int), false);
tile_set_scenes_collection_source->set_scene_tile_id(scene_id, as_int);
scene_id = as_int;
emit_signal(SNAME("changed"), "id");
emit_signal(CoreStringName(changed), "id");
for (int i = 0; i < tile_set_scenes_collection_source_editor->scene_tiles_list->get_item_count(); i++) {
if (int(tile_set_scenes_collection_source_editor->scene_tiles_list->get_item_metadata(i)) == scene_id) {
tile_set_scenes_collection_source_editor->scene_tiles_list->select(i);
@ -156,11 +154,11 @@ bool TileSetScenesCollectionSourceEditor::SceneTileProxyObject::_set(const Strin
return true;
} else if (p_name == "scene") {
tile_set_scenes_collection_source->set_scene_tile_scene(scene_id, p_value);
emit_signal(SNAME("changed"), "scene");
emit_signal(CoreStringName(changed), "scene");
return true;
} else if (p_name == "display_placeholder") {
tile_set_scenes_collection_source->set_scene_tile_display_placeholder(scene_id, p_value);
emit_signal(SNAME("changed"), "display_placeholder");
emit_signal(CoreStringName(changed), "display_placeholder");
return true;
}
@ -531,7 +529,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
middle_vbox_container->add_child(scenes_collection_source_inspector_label);
scenes_collection_source_proxy_object = memnew(TileSetScenesCollectionProxyObject());
scenes_collection_source_proxy_object->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_scenes_collection_source_proxy_object_changed));
scenes_collection_source_proxy_object->connect(CoreStringName(changed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_scenes_collection_source_proxy_object_changed));
scenes_collection_source_inspector = memnew(EditorInspector);
scenes_collection_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
@ -546,8 +544,8 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
middle_vbox_container->add_child(tile_inspector_label);
tile_proxy_object = memnew(SceneTileProxyObject(this));
tile_proxy_object->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_scenes_list).unbind(1));
tile_proxy_object->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
tile_proxy_object->connect(CoreStringName(changed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_scenes_list).unbind(1));
tile_proxy_object->connect(CoreStringName(changed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
tile_inspector = memnew(EditorInspector);
tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);

View file

@ -370,8 +370,8 @@ void TileMapEditorPlugin::_edit_tile_map_layer(TileMapLayer *p_tile_map_layer, b
// Update the object IDs.
tile_map_layer_id = p_tile_map_layer->get_instance_id();
p_tile_map_layer->connect("changed", callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_changed));
p_tile_map_layer->connect("tree_exited", callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_removed));
p_tile_map_layer->connect(CoreStringName(changed), callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_changed));
p_tile_map_layer->connect(SceneStringName(tree_exited), callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_removed));
// Update the edited tileset.
Ref<TileSet> tile_set = p_tile_map_layer->get_tile_set();
@ -406,8 +406,8 @@ void TileMapEditorPlugin::_notification(int p_notification) {
void TileMapEditorPlugin::edit(Object *p_object) {
TileMapLayer *edited_layer = Object::cast_to<TileMapLayer>(ObjectDB::get_instance(tile_map_layer_id));
if (edited_layer) {
edited_layer->disconnect("changed", callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_changed));
edited_layer->disconnect("tree_exited", callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_removed));
edited_layer->disconnect(CoreStringName(changed), callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_changed));
edited_layer->disconnect(SceneStringName(tree_exited), callable_mp(this, &TileMapEditorPlugin::_tile_map_layer_removed));
}
tile_map_group_id = ObjectID();

View file

@ -1252,7 +1252,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
commit_message->set_custom_minimum_size(Size2(200, 100));
commit_message->set_line_wrapping_mode(TextEdit::LINE_WRAPPING_BOUNDARY);
commit_message->connect(SNAME("text_changed"), callable_mp(this, &VersionControlEditorPlugin::_update_commit_button));
commit_message->connect(SNAME("gui_input"), callable_mp(this, &VersionControlEditorPlugin::_commit_message_gui_input));
commit_message->connect(SceneStringName(gui_input), callable_mp(this, &VersionControlEditorPlugin::_commit_message_gui_input));
commit_area->add_child(commit_message);
ED_SHORTCUT("version_control/commit", TTR("Commit"), KeyModifierMask::CMD_OR_CTRL | Key::ENTER);

View file

@ -130,15 +130,15 @@ void VSGraphNode::draw_port(int p_slot_index, Point2i p_pos, bool p_left, const
void VSRerouteNode::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
connect("mouse_entered", callable_mp(this, &VSRerouteNode::_on_mouse_entered));
connect("mouse_exited", callable_mp(this, &VSRerouteNode::_on_mouse_exited));
connect(SceneStringName(mouse_entered), callable_mp(this, &VSRerouteNode::_on_mouse_entered));
connect(SceneStringName(mouse_exited), callable_mp(this, &VSRerouteNode::_on_mouse_exited));
} break;
case NOTIFICATION_DRAW: {
Vector2 offset = Vector2(0, -16);
Color drag_bg_color = get_theme_color(SNAME("drag_background"), SNAME("VSRerouteNode"));
draw_circle(get_size() * 0.5 + offset, 16, Color(drag_bg_color, selected ? 1 : icon_opacity));
Ref<Texture2D> icon = get_theme_icon(SNAME("ToolMove"), SNAME("EditorIcons"));
Ref<Texture2D> icon = get_editor_theme_icon(SNAME("ToolMove"));
Point2 icon_offset = -icon->get_size() * 0.5 + get_size() * 0.5 + offset;
draw_texture(icon, icon_offset, Color(1, 1, 1, selected ? 1 : icon_opacity));
} break;
@ -292,8 +292,8 @@ void VisualShaderGraphPlugin::set_input_port_default_value(VisualShader::Type p_
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
Callable ce = callable_mp(editor, &VisualShaderEditor::_draw_color_over_button);
if (!button->is_connected("draw", ce)) {
button->connect("draw", ce.bind(button, p_value));
if (!button->is_connected(SceneStringName(draw), ce)) {
button->connect(SceneStringName(draw), ce.bind(button, p_value));
}
} break;
case Variant::BOOL: {
@ -816,7 +816,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
parameter_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
parameter_name->set_text(parameter->get_parameter_name());
parameter_name->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_parameter_line_edit_changed).bind(p_id));
parameter_name->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_parameter_line_edit_focus_out).bind(parameter_name, p_id));
parameter_name->connect(SceneStringName(focus_exited), callable_mp(editor, &VisualShaderEditor::_parameter_line_edit_focus_out).bind(parameter_name, p_id));
if (vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") {
hb = memnew(HBoxContainer);
@ -1128,7 +1128,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
name_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
name_box->set_text(name_left);
name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_input_port_name).bind(name_box, p_id, j), CONNECT_DEFERRED);
name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, j, false), CONNECT_DEFERRED);
name_box->connect(SceneStringName(focus_exited), callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, j, false), CONNECT_DEFERRED);
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
@ -1170,7 +1170,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
name_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
name_box->set_text(name_right);
name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_output_port_name).bind(name_box, p_id, i), CONNECT_DEFERRED);
name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, true), CONNECT_DEFERRED);
name_box->connect(SceneStringName(focus_exited), callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, true), CONNECT_DEFERRED);
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
@ -1414,7 +1414,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
expression_box->set_context_menu_enabled(false);
expression_box->set_draw_line_numbers(true);
expression_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_expression_focus_out).bind(expression_box, p_id));
expression_box->connect(SceneStringName(focus_exited), callable_mp(editor, &VisualShaderEditor::_expression_focus_out).bind(expression_box, p_id));
}
}
@ -2285,7 +2285,7 @@ void VisualShaderEditor::_draw_color_over_button(Object *p_obj, Color p_color) {
return;
}
Ref<StyleBox> normal = get_theme_stylebox(SNAME("normal"), SNAME("Button"));
Ref<StyleBox> normal = get_theme_stylebox(CoreStringName(normal), SNAME("Button"));
button->draw_rect(Rect2(normal->get_offset(), button->get_size() - normal->get_minimum_size()), p_color);
}
@ -6068,10 +6068,10 @@ VisualShaderEditor::VisualShaderEditor() {
graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes).bind(false));
graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes).bind(false, Point2()));
graph->connect("delete_nodes_request", callable_mp(this, &VisualShaderEditor::_delete_nodes_request));
graph->connect("gui_input", callable_mp(this, &VisualShaderEditor::_graph_gui_input));
graph->connect(SceneStringName(gui_input), callable_mp(this, &VisualShaderEditor::_graph_gui_input));
graph->connect("connection_to_empty", callable_mp(this, &VisualShaderEditor::_connection_to_empty));
graph->connect("connection_from_empty", callable_mp(this, &VisualShaderEditor::_connection_from_empty));
graph->connect("visibility_changed", callable_mp(this, &VisualShaderEditor::_visibility_changed));
graph->connect(SceneStringName(visibility_changed), callable_mp(this, &VisualShaderEditor::_visibility_changed));
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
@ -6274,7 +6274,7 @@ VisualShaderEditor::VisualShaderEditor() {
node_filter = memnew(LineEdit);
filter_hb->add_child(node_filter);
node_filter->connect("text_changed", callable_mp(this, &VisualShaderEditor::_member_filter_changed));
node_filter->connect("gui_input", callable_mp(this, &VisualShaderEditor::_sbox_input));
node_filter->connect(SceneStringName(gui_input), callable_mp(this, &VisualShaderEditor::_sbox_input));
node_filter->set_h_size_flags(SIZE_EXPAND_FILL);
node_filter->set_placeholder(TTR("Search"));
@ -6419,7 +6419,7 @@ VisualShaderEditor::VisualShaderEditor() {
frame_title_change_popup->add_child(frame_title_change_edit);
frame_title_change_edit->reset_size();
frame_title_change_popup->reset_size();
frame_title_change_popup->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_frame_title_popup_focus_out));
frame_title_change_popup->connect(SceneStringName(focus_exited), callable_mp(this, &VisualShaderEditor::_frame_title_popup_focus_out));
frame_title_change_popup->connect("popup_hide", callable_mp(this, &VisualShaderEditor::_frame_title_popup_hide));
add_child(frame_title_change_popup);

View file

@ -1605,7 +1605,7 @@ ProjectManager::ProjectManager() {
DisplayServer::get_singleton()->process_events();
DisplayServer::get_singleton()->window_set_flag(DisplayServer::WINDOW_FLAG_EXTEND_TO_TITLE, true, DisplayServer::MAIN_WINDOW_ID);
title_bar->set_can_move_window(true);
title_bar->connect("item_rect_changed", callable_mp(this, &ProjectManager::_titlebar_resized));
title_bar->connect(SceneStringName(item_rect_changed), callable_mp(this, &ProjectManager::_titlebar_resized));
}
_update_size_limits();

Some files were not shown because too many files have changed in this diff Show more