diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index 810c0c53266..296218bf25a 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -126,10 +126,6 @@ void Label3D::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_triangle_mesh"), &Label3D::generate_triangle_mesh); - ClassDB::bind_method(D_METHOD("_queue_update"), &Label3D::_queue_update); - ClassDB::bind_method(D_METHOD("_font_changed"), &Label3D::_font_changed); - ClassDB::bind_method(D_METHOD("_im_update"), &Label3D::_im_update); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001,suffix:m"), "set_pixel_size", "get_pixel_size"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset", PROPERTY_HINT_NONE, "suffix:px"), "set_offset", "get_offset"); @@ -239,7 +235,7 @@ void Label3D::_queue_update() { } pending_update = true; - call_deferred(SceneStringNames::get_singleton()->_im_update); + callable_mp(this, &Label3D::_im_update).call_deferred(); } AABB Label3D::get_aabb() const { @@ -766,12 +762,12 @@ void Label3D::_font_changed() { void Label3D::set_font(const Ref &p_font) { if (font_override != p_font) { if (font_override.is_valid()) { - font_override->disconnect(CoreStringNames::get_singleton()->changed, Callable(this, "_font_changed")); + font_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label3D::_font_changed)); } font_override = p_font; dirty_font = true; if (font_override.is_valid()) { - font_override->connect(CoreStringNames::get_singleton()->changed, Callable(this, "_font_changed")); + font_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label3D::_font_changed)); } _queue_update(); } @@ -783,7 +779,7 @@ Ref Label3D::get_font() const { Ref Label3D::_get_font_or_default() const { if (theme_font.is_valid()) { - theme_font->disconnect(CoreStringNames::get_singleton()->changed, Callable(const_cast(this), "_font_changed")); + theme_font->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(const_cast(this), &Label3D::_font_changed)); theme_font.unref(); } @@ -801,7 +797,7 @@ Ref Label3D::_get_font_or_default() const { Ref f = ThemeDB::get_singleton()->get_project_theme()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E); if (f.is_valid()) { theme_font = f; - theme_font->connect(CoreStringNames::get_singleton()->changed, Callable(const_cast(this), "_font_changed")); + theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(const_cast(this), &Label3D::_font_changed)); } return f; } @@ -818,7 +814,7 @@ Ref Label3D::_get_font_or_default() const { Ref f = ThemeDB::get_singleton()->get_default_theme()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E); if (f.is_valid()) { theme_font = f; - theme_font->connect(CoreStringNames::get_singleton()->changed, Callable(const_cast(this), "_font_changed")); + theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(const_cast(this), &Label3D::_font_changed)); } return f; } @@ -829,7 +825,7 @@ Ref Label3D::_get_font_or_default() const { Ref f = ThemeDB::get_singleton()->get_default_theme()->get_theme_item(Theme::DATA_TYPE_FONT, "font", StringName()); if (f.is_valid()) { theme_font = f; - theme_font->connect(CoreStringNames::get_singleton()->changed, Callable(const_cast(this), "_font_changed")); + theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(const_cast(this), &Label3D::_font_changed)); } return f; } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 6e44696fe4d..665eb2916b6 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -372,7 +372,7 @@ void SpriteBase3D::_queue_redraw() { update_gizmos(); pending_update = true; - call_deferred(SceneStringNames::get_singleton()->_im_update); + callable_mp(this, &SpriteBase3D::_im_update).call_deferred(); } AABB SpriteBase3D::get_aabb() const { @@ -577,8 +577,6 @@ void SpriteBase3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_item_rect"), &SpriteBase3D::get_item_rect); ClassDB::bind_method(D_METHOD("generate_triangle_mesh"), &SpriteBase3D::generate_triangle_mesh); - ClassDB::bind_method(D_METHOD("_im_update"), &SpriteBase3D::_im_update); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset", PROPERTY_HINT_NONE, "suffix:px"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h"); diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp index 536ffd1fe48..b823ef65726 100644 --- a/scene/scene_string_names.cpp +++ b/scene/scene_string_names.cpp @@ -168,8 +168,6 @@ SceneStringNames::SceneStringNames() { _drop_data = StaticCString::create("_drop_data"); _can_drop_data = StaticCString::create("_can_drop_data"); - _im_update = StaticCString::create("_im_update"); // Sprite3D - baked_light_changed = StaticCString::create("baked_light_changed"); _baked_light_changed = StaticCString::create("_baked_light_changed"); diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h index ca8f7a1e7df..cb5fffa595b 100644 --- a/scene/scene_string_names.h +++ b/scene/scene_string_names.h @@ -180,8 +180,6 @@ public: StringName _get_minimum_size; - StringName _im_update; - StringName baked_light_changed; StringName _baked_light_changed;