1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

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

@@ -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);