diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index fca69f34f3b..28642f1bb41 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -491,10 +491,10 @@ void AnimationBezierTrackEdit::_notification(int p_what) { } draw_rect( Rect2(bs_from, bs_to - bs_from), - get_theme_color("box_selection_fill_color", "Editor")); + get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor"))); draw_rect( Rect2(bs_from, bs_to - bs_from), - get_theme_color("box_selection_stroke_color", "Editor"), + get_theme_color(SNAME("box_selection_stroke_color"), SNAME("Editor")), false, Math::round(EDSCALE)); } diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 989774e943f..5fda1c76ef4 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -397,15 +397,15 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da s->select(0); } } - emit_signal("stack_dump", stack_dump_info); + emit_signal(SNAME("stack_dump"), stack_dump_info); } else if (p_msg == "stack_frame_vars") { inspector->clear_stack_variables(); ERR_FAIL_COND(p_data.size() != 1); - emit_signal("stack_frame_vars", p_data[0]); + emit_signal(SNAME("stack_frame_vars"), p_data[0]); } else if (p_msg == "stack_frame_var") { inspector->add_stack_variable(p_data); - emit_signal("stack_frame_var", p_data); + emit_signal(SNAME("stack_frame_var"), p_data); } else if (p_msg == "output") { ERR_FAIL_COND(p_data.size() != 2); @@ -434,7 +434,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } break; } EditorNode::get_log()->add_message(output_strings[i], msg_type); - emit_signal("output", output_strings[i]); + emit_signal(SNAME("output"), output_strings[i]); } } else if (p_msg == "performance:profile_frame") { Vector frame_data; diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index 4ad45f96495..e69ced8522c 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -118,8 +118,8 @@ void EditorCommandPalette::_update_command_search(const String &search_text) { section->set_text(0, item_name); section->set_selectable(0, false); section->set_selectable(1, false); - section->set_custom_bg_color(0, search_options->get_theme_color("prop_subsection", "Editor")); - section->set_custom_bg_color(1, search_options->get_theme_color("prop_subsection", "Editor")); + section->set_custom_bg_color(0, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor"))); + section->set_custom_bg_color(1, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor"))); sections[section_name] = section; } @@ -263,7 +263,7 @@ Ref EditorCommandPalette::add_shortcut_command(const String &p_command } void EditorCommandPalette::_theme_changed() { - command_search_box->set_right_icon(search_options->get_theme_icon("Search", "EditorIcons")); + command_search_box->set_right_icon(search_options->get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); } void EditorCommandPalette::_save_history() const { diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index bf95e6cf623..89569836461 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -86,7 +86,7 @@ void EditorFileDialog::_notification(int p_what) { if (preview_wheel_index >= 8) { preview_wheel_index = 0; } - Ref frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons"); + Ref frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), SNAME("EditorIcons")); preview->set_texture(frame); preview_wheel_timeout = 0.1; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ef8dabc19a2..b4850e6ebbb 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -576,7 +576,7 @@ void EditorNode::_notification(int p_what) { // update the icon itself only when the spinner is visible if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) { - update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), "EditorIcons")); + update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons"))); } } @@ -767,7 +767,7 @@ void EditorNode::_update_update_spinner() { // On a light theme, icons are dark, so we need to modulate them with an even brighter color. const bool dark_theme = EditorSettings::get_singleton()->is_dark_theme(); update_spinner->set_self_modulate( - gui_base->get_theme_color("error_color", "Editor") * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25))); + gui_base->get_theme_color(SNAME("error_color"), SNAME("Editor")) * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25))); } else { update_spinner->set_tooltip(TTR("Spins when the editor window redraws.")); update_spinner->set_self_modulate(Color(1, 1, 1)); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 6c0d11cc6b9..c0dadc44846 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2951,8 +2951,8 @@ void EditorPropertyResource::_update_property_bg() { count_subinspectors = MIN(15, count_subinspectors); add_theme_color_override("property_color", get_theme_color(SNAME("sub_inspector_property_color"), SNAME("Editor"))); - add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), "Editor")); - add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), "Editor")); + add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), SNAME("Editor"))); + add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), SNAME("Editor"))); add_theme_constant_override("font_offset", get_theme_constant(SNAME("sub_inspector_font_offset"), SNAME("Editor"))); add_theme_constant_override("vseparation", 0); diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index c98fbea530d..9dbf69a779b 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -924,7 +924,7 @@ void EditorShaderPicker::set_create_options(Object *p_menu_node) { return; } - menu_node->add_icon_item(get_theme_icon("Shader", "EditorIcons"), TTR("New Shader"), OBJ_MENU_NEW_SHADER); + menu_node->add_icon_item(get_theme_icon(SNAME("Shader"), SNAME("EditorIcons")), TTR("New Shader"), OBJ_MENU_NEW_SHADER); menu_node->add_separator(); } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 04192efecde..1758ba7048c 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3968,7 +3968,7 @@ void CanvasItemEditor::edit(CanvasItem *p_canvas_item) { void CanvasItemEditor::_update_context_menu_stylebox() { // This must be called when the theme changes to follow the new accent color. Ref context_menu_stylebox = memnew(StyleBoxFlat); - const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor"); + const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor")); context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1)); // Add an underline to the StyleBox, but prevent its minimum vertical size from changing. context_menu_stylebox->set_border_color(accent_color); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 231c5c4f724..e9b715d645e 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6014,7 +6014,7 @@ void fragment() { void Node3DEditor::_update_context_menu_stylebox() { // This must be called when the theme changes to follow the new accent color. Ref context_menu_stylebox = memnew(StyleBoxFlat); - const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor"); + const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor")); context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1)); // Add an underline to the StyleBox, but prevent its minimum vertical size from changing. context_menu_stylebox->set_border_color(accent_color); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index d54bf73028d..3de87d9df7b 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -522,7 +522,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) { if (p_node == selected) { selected = nullptr; - emit_signal("node_selected"); + emit_signal(SNAME("node_selected")); } } @@ -630,7 +630,7 @@ void SceneTreeEditor::_selected_changed() { selected = get_node(np); blocked++; - emit_signal("node_selected"); + emit_signal(SNAME("node_selected")); blocked--; } @@ -757,7 +757,7 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) { } if (p_emit_selected) { - emit_signal("node_selected"); + emit_signal(SNAME("node_selected")); } } diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 7e6f154fab3..6bbefb3bb22 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -190,7 +190,7 @@ void ShaderCreateDialog::_create_new() { } } - emit_signal("shader_created", shader); + emit_signal(SNAME("shader_created"), shader); hide(); } @@ -203,7 +203,7 @@ void ShaderCreateDialog::_load_exist() { return; } - emit_signal("shader_created", p_shader); + emit_signal(SNAME("shader_created"), p_shader); hide(); } @@ -404,18 +404,18 @@ String ShaderCreateDialog::_validate_path(const String &p_path) { void ShaderCreateDialog::_msg_script_valid(bool valid, const String &p_msg) { error_label->set_text("- " + p_msg); if (valid) { - error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor")); + error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor"))); } else { - error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor")); + error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor"))); } } void ShaderCreateDialog::_msg_path_valid(bool valid, const String &p_msg) { path_error_label->set_text("- " + p_msg); if (valid) { - path_error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor")); + path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor"))); } else { - path_error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor")); + path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor"))); } } diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp index 70361f47874..c34c1501458 100644 --- a/scene/3d/bone_attachment_3d.cpp +++ b/scene/3d/bone_attachment_3d.cpp @@ -161,7 +161,7 @@ void BoneAttachment3D::_check_bind() { bone_idx = sk->find_bone(bone_name); } if (bone_idx != -1) { - sk->call_deferred("connect", "bone_pose_changed", callable_mp(this, &BoneAttachment3D::on_bone_pose_update)); + sk->call_deferred(SNAME("connect"), "bone_pose_changed", callable_mp(this, &BoneAttachment3D::on_bone_pose_update)); bound = true; call_deferred(SNAME("on_bone_pose_update"), bone_idx); } diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index b9b02b1427a..071b7f5bb66 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -2103,7 +2103,7 @@ void GraphEdit::arrange_nodes() { largest_node_size = 0.0f; } - emit_signal("begin_node_move"); + emit_signal(SNAME("begin_node_move")); for (const Set::Element *E = selected_nodes.front(); E; E = E->next()) { GraphNode *gn = Object::cast_to(node_names[E->get()]); gn->set_drag(true); @@ -2116,7 +2116,7 @@ void GraphEdit::arrange_nodes() { gn->set_position_offset(pos); gn->set_drag(false); } - emit_signal("end_node_move"); + emit_signal(SNAME("end_node_move")); arranging_graph = false; } diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index e9414598a24..be05fd5a604 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -194,7 +194,7 @@ Popup::~Popup() { } Size2 PopupPanel::_get_contents_minimum_size() const { - Ref p = get_theme_stylebox("panel", get_class_name()); + Ref p = get_theme_stylebox(SNAME("panel"), get_class_name()); Size2 ms; @@ -217,7 +217,7 @@ Size2 PopupPanel::_get_contents_minimum_size() const { } void PopupPanel::_update_child_rects() { - Ref p = get_theme_stylebox("panel", get_class_name()); + Ref p = get_theme_stylebox(SNAME("panel"), get_class_name()); Vector2 cpos(p->get_offset()); Vector2 csize(get_size() - p->get_minimum_size()); @@ -244,9 +244,9 @@ void PopupPanel::_update_child_rects() { void PopupPanel::_notification(int p_what) { if (p_what == NOTIFICATION_THEME_CHANGED) { - panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name())); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), get_class_name())); } else if (p_what == NOTIFICATION_READY || p_what == NOTIFICATION_ENTER_TREE) { - panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name())); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), get_class_name())); _update_child_rects(); } else if (p_what == NOTIFICATION_WM_SIZE_CHANGED) { _update_child_rects();