diff --git a/modules/entity_spell_system/defines.h b/modules/entity_spell_system/defines.h index bc3789aa1..a640ed50d 100644 --- a/modules/entity_spell_system/defines.h +++ b/modules/entity_spell_system/defines.h @@ -16,7 +16,4 @@ arr_into.push_back(e); \ } -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - #endif diff --git a/modules/entity_spell_system/entities/entity.cpp b/modules/entity_spell_system/entities/entity.cpp index 4ad5d2117..272882a2c 100644 --- a/modules/entity_spell_system/entities/entity.cpp +++ b/modules/entity_spell_system/entities/entity.cpp @@ -4363,8 +4363,8 @@ void Entity::skill_adds(Ref skill) { if (skill_hass(skill)) return; - skill->CONNECT("current_changed", this, Entity, skill_scurrent_changed); - skill->CONNECT("max_changed", this, Entity, skill_smax_changed); + skill->connect("current_changed", this, "skill_scurrent_changed"); + skill->connect("max_changed", this, "skill_smax_changed"); _s_skills.push_back(skill); @@ -5175,23 +5175,23 @@ Ref Entity::gets_bag() const { } void Entity::sets_bag(const Ref bag) { if (_s_bag.is_valid()) { - _s_bag->DISCONNECT("item_added", this, Entity, notification_item_sadded); - _s_bag->DISCONNECT("item_removed", this, Entity, notification_item_sremoved); - _s_bag->DISCONNECT("item_swapped", this, Entity, notification_items_sswapped); - _s_bag->DISCONNECT("item_count_changed", this, Entity, notification_item_sscount_changed); - _s_bag->DISCONNECT("overburdened", this, Entity, notification_soverburdened); - _s_bag->DISCONNECT("overburden_removed", this, Entity, notification_soverburden_removed); + _s_bag->disconnect("item_added", this, "notification_item_sadded"); + _s_bag->disconnect("item_removed", this, "notification_item_sremoved"); + _s_bag->disconnect("item_swapped", this, "notification_items_sswapped"); + _s_bag->disconnect("item_count_changed", this, "notification_item_sscount_changed"); + _s_bag->disconnect("overburdened", this, "notification_soverburdened"); + _s_bag->disconnect("overburden_removed", this, "notification_soverburden_removed"); } _s_bag = bag; if (_s_bag.is_valid()) { - _s_bag->CONNECT("item_added", this, Entity, notification_item_sadded); - _s_bag->CONNECT("item_removed", this, Entity, notification_item_sremoved); - _s_bag->CONNECT("item_swapped", this, Entity, notification_items_sswapped); - _s_bag->CONNECT("item_count_changed", this, Entity, notification_item_sscount_changed); - _s_bag->CONNECT("overburdened", this, Entity, notification_soverburdened); - _s_bag->CONNECT("overburden_removed", this, Entity, notification_soverburden_removed); + _s_bag->connect("item_added", this, "notification_item_sadded"); + _s_bag->connect("item_removed", this, "notification_item_sremoved"); + _s_bag->connect("item_swapped", this, "notification_items_sswapped"); + _s_bag->connect("item_count_changed", this, "notification_item_sscount_changed"); + _s_bag->connect("overburdened", this, "notification_soverburdened"); + _s_bag->connect("overburden_removed", this, "notification_soverburden_removed"); } emit_signal("sbag_changed", this, _s_bag); @@ -5217,19 +5217,19 @@ Ref Entity::gets_target_bag() const { } void Entity::sets_target_bag(const Ref bag) { if (_s_target_bag.is_valid()) { - _s_target_bag->DISCONNECT("item_added", this, Entity, notification_target_item_sadded); - _s_target_bag->DISCONNECT("item_removed", this, Entity, notification_target_item_sremoved); - _s_target_bag->DISCONNECT("item_swapped", this, Entity, notification_target_items_sswapped); - _s_target_bag->DISCONNECT("item_count_changed", this, Entity, notification_target_item_sscount_changed); + _s_target_bag->disconnect("item_added", this, "notification_target_item_sadded"); + _s_target_bag->disconnect("item_removed", this, "notification_target_item_sremoved"); + _s_target_bag->disconnect("item_swapped", this, "notification_target_items_sswapped"); + _s_target_bag->disconnect("item_count_changed", this, "notification_target_item_sscount_changed"); } _s_target_bag = bag; if (_s_target_bag.is_valid()) { - _s_target_bag->CONNECT("item_added", this, Entity, notification_target_item_sadded); - _s_target_bag->CONNECT("item_removed", this, Entity, notification_target_item_sremoved); - _s_target_bag->CONNECT("item_swapped", this, Entity, notification_target_items_sswapped); - _s_target_bag->CONNECT("item_count_changed", this, Entity, notification_target_item_sscount_changed); + _s_target_bag->connect("item_added", this, "notification_target_item_sadded"); + _s_target_bag->connect("item_removed", this, "notification_target_item_sremoved"); + _s_target_bag->connect("item_swapped", this, "notification_target_items_sswapped"); + _s_target_bag->connect("item_count_changed", this, "notification_target_item_sscount_changed"); } emit_signal("starget_bag_changed", this, _s_target_bag); diff --git a/modules/entity_spell_system/profiles/player_profile.cpp b/modules/entity_spell_system/profiles/player_profile.cpp index f14cadb9e..5a669f15a 100644 --- a/modules/entity_spell_system/profiles/player_profile.cpp +++ b/modules/entity_spell_system/profiles/player_profile.cpp @@ -61,7 +61,7 @@ Ref PlayerProfile::get_class_profile_index(const int index) { } void PlayerProfile::add_class_profile(Ref profile) { - profile->CONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + profile->connect("changed", this, "_on_class_profile_changed"); _class_profiles.push_back(profile); @@ -70,7 +70,7 @@ void PlayerProfile::add_class_profile(Ref profile) { void PlayerProfile::clear_class_profiles() { for (int i = 0; i < _class_profiles.size(); ++i) { - _class_profiles.get(i)->DISCONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + _class_profiles.get(i)->disconnect("changed", this, "_on_class_profile_changed"); } _class_profiles.clear(); @@ -79,7 +79,7 @@ void PlayerProfile::clear_class_profiles() { } void PlayerProfile::remove_class_profile(const int index) { - _class_profiles.get(index)->DISCONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + _class_profiles.get(index)->disconnect("changed", this, "_on_class_profile_changed"); _class_profiles.remove(index); @@ -101,7 +101,7 @@ Ref PlayerProfile::get_class_profile(const StringName &class_path) class_profile->load_defaults(); - class_profile->CONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + class_profile->connect("changed", this, "_on_class_profile_changed"); _class_profiles.push_back(Ref(class_profile)); @@ -159,7 +159,7 @@ void PlayerProfile::from_dict(const Dictionary &dict) { c->from_dict(arr.get(i)); - c->CONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + c->connect("changed", this, "_on_class_profile_changed"); _class_profiles.push_back(c); } @@ -187,7 +187,7 @@ void PlayerProfile::load_defaults() { for (int i = 0; i < _class_profiles.size(); ++i) { _class_profiles.get(i)->load_defaults(); - _class_profiles.get(i)->CONNECT("changed", this, PlayerProfile, _on_class_profile_changed); + _class_profiles.get(i)->connect("changed", this, "_on_class_profile_changed"); } emit_change(); diff --git a/modules/entity_spell_system/singletons/profile_manager.cpp b/modules/entity_spell_system/singletons/profile_manager.cpp index 29d3389a0..492b21bc1 100644 --- a/modules/entity_spell_system/singletons/profile_manager.cpp +++ b/modules/entity_spell_system/singletons/profile_manager.cpp @@ -167,9 +167,9 @@ void ProfileManager::from_dict(const Dictionary &dict) { clears_player_profiles(); - _c_player_profile->DISCONNECT("changed", this, ProfileManager, _on_player_profile_changed); + _c_player_profile->disconnect("changed", this, "_on_player_profile_changed"); _c_player_profile->from_dict(dict.get("cplayer_profile", Dictionary())); - _c_player_profile->CONNECT("changed", this, ProfileManager, _on_player_profile_changed); + _c_player_profile->connect("changed", this, "_on_player_profile_changed"); Array arr = dict.get("splayer_profiles", Array()); @@ -179,7 +179,7 @@ void ProfileManager::from_dict(const Dictionary &dict) { c->from_dict(arr.get(i)); - c->CONNECT("changed", this, ProfileManager, _on_player_profile_changed); + c->connect("changed", this, "_on_player_profile_changed"); _s_player_profiles.push_back(c); } @@ -200,7 +200,7 @@ ProfileManager::ProfileManager() { _c_player_profile.instance(); - _c_player_profile->CONNECT("changed", this, ProfileManager, _on_player_profile_changed); + _c_player_profile->connect("changed", this, "_on_player_profile_changed"); if (!Engine::get_singleton()->is_editor_hint() && _automatic_load) call_deferred("load"); @@ -209,7 +209,7 @@ ProfileManager::ProfileManager() { ProfileManager::~ProfileManager() { _instance = NULL; - _c_player_profile->DISCONNECT("changed", this, ProfileManager, _on_player_profile_changed); + _c_player_profile->disconnect("changed", this, "_on_player_profile_changed"); _s_player_profiles.clear(); } diff --git a/modules/mesh_utils/defines.h b/modules/mesh_utils/defines.h index 9e1e6f433..4a4beba62 100644 --- a/modules/mesh_utils/defines.h +++ b/modules/mesh_utils/defines.h @@ -16,7 +16,4 @@ arr_into.push_back(e); \ } -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - #endif diff --git a/modules/props/editor/prop_editor_plugin.cpp b/modules/props/editor/prop_editor_plugin.cpp index a4c2be0c9..6a8029d2d 100644 --- a/modules/props/editor/prop_editor_plugin.cpp +++ b/modules/props/editor/prop_editor_plugin.cpp @@ -28,9 +28,6 @@ SOFTWARE. #include "core/os/input.h" -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - void PropEditorPlugin::convert_active_scene_to_prop_data() { SceneTree *st = SceneTree::get_singleton(); @@ -109,7 +106,7 @@ PropEditorPlugin::PropEditorPlugin(EditorNode *p_node) { container->add_child(b); b->set_flat(true); - b->CONNECT("pressed", this, PropEditorPlugin, _quick_convert_button_pressed); + b->connect("pressed", this, "_quick_convert_button_pressed"); b->set_text("To Prop"); b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to PropData.", KEY_MASK_ALT + KEY_U)); diff --git a/modules/props_2d/editor/prop_2d_editor_plugin.cpp b/modules/props_2d/editor/prop_2d_editor_plugin.cpp index b3a3c4530..ebc00d9b9 100644 --- a/modules/props_2d/editor/prop_2d_editor_plugin.cpp +++ b/modules/props_2d/editor/prop_2d_editor_plugin.cpp @@ -28,9 +28,6 @@ SOFTWARE. #include "core/os/input.h" -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - void Prop2DEditorPlugin::convert_active_scene_to_prop_data() { SceneTree *st = SceneTree::get_singleton(); @@ -103,7 +100,7 @@ Prop2DEditorPlugin::Prop2DEditorPlugin(EditorNode *p_node) { Button *b = memnew(Button); - b->CONNECT("pressed", this, Prop2DEditorPlugin, _quick_convert_button_pressed); + b->connect("pressed", this, "_quick_convert_button_pressed"); b->set_text("To Prop2D"); b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to Prop2DData.", KEY_MASK_ALT + KEY_U)); diff --git a/modules/terraman/defines.h b/modules/terraman/defines.h index 9f71cf69e..5e7f62cdb 100644 --- a/modules/terraman/defines.h +++ b/modules/terraman/defines.h @@ -16,9 +16,6 @@ arr_into.push_back(e); \ } -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - #define CALL(func, ...) \ call(#func, ##__VA_ARGS__); diff --git a/modules/terraman/world/terrain_world_editor.cpp b/modules/terraman/world/terrain_world_editor.cpp index c3595455d..8dad3679e 100644 --- a/modules/terraman/world/terrain_world_editor.cpp +++ b/modules/terraman/world/terrain_world_editor.cpp @@ -164,7 +164,7 @@ void TerrainWorldEditor::edit(TerrainWorld *p_world) { button->set_button_group(_surfaces_button_group); button->set_h_size_flags(SIZE_EXPAND_FILL); - button->CONNECT("button_up", this, TerrainWorldEditor, _on_surface_button_pressed); + button->connect("button_up", this, "_on_surface_button_pressed"); _surfaces_vbox_container->add_child(button); @@ -208,7 +208,7 @@ TerrainWorldEditor::TerrainWorldEditor(EditorNode *p_editor) { add_button->set_button_group(_tool_button_group); add_button->set_meta("tool_mode", TOOL_MODE_ADD); - add_button->CONNECT("button_up", this, TerrainWorldEditor, _on_tool_button_pressed); + add_button->connect("button_up", this, "_on_tool_button_pressed"); add_button->set_shortcut(ED_SHORTCUT("voxelman_world_editor/add_mode", "Add Mode", KEY_A)); spatial_editor_hb->add_child(add_button); @@ -219,7 +219,7 @@ TerrainWorldEditor::TerrainWorldEditor(EditorNode *p_editor) { remove_button->set_button_group(_tool_button_group); remove_button->set_meta("tool_mode", TOOL_MODE_REMOVE); - remove_button->CONNECT("button_up", this, TerrainWorldEditor, _on_tool_button_pressed); + remove_button->connect("button_up", this, "_on_tool_button_pressed"); remove_button->set_shortcut(ED_SHORTCUT("voxelman_world_editor/remove_mode", "Remove Mode", KEY_S)); spatial_editor_hb->add_child(remove_button); @@ -227,7 +227,7 @@ TerrainWorldEditor::TerrainWorldEditor(EditorNode *p_editor) { ToolButton *insert_buton = memnew(ToolButton); insert_buton->set_text("Insert"); - insert_buton->CONNECT("button_up", this, TerrainWorldEditor, _on_insert_block_at_camera_button_pressed); + insert_buton->connect("button_up", this, "_on_insert_block_at_camera_button_pressed"); insert_buton->set_shortcut(ED_SHORTCUT("voxelman_world_editor/instert_block_at_camera", "Insert at camera", KEY_B)); spatial_editor_hb->add_child(insert_buton); @@ -242,7 +242,7 @@ TerrainWorldEditor::TerrainWorldEditor(EditorNode *p_editor) { _isolevel_slider->set_v_size_flags(SIZE_EXPAND_FILL); spatial_editor_hb->add_child(_isolevel_slider); - _isolevel_slider->CONNECT("value_changed", this, TerrainWorldEditor, _on_isolevel_slider_value_changed); + _isolevel_slider->connect("value_changed", this, "_on_isolevel_slider_value_changed"); _isolevel_slider->hide(); diff --git a/modules/terraman_2d/defines.h b/modules/terraman_2d/defines.h index 27f0ee12f..1b8ec08b1 100644 --- a/modules/terraman_2d/defines.h +++ b/modules/terraman_2d/defines.h @@ -16,9 +16,6 @@ arr_into.push_back(e); \ } -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - #define CALL(func, ...) \ call(#func, ##__VA_ARGS__); diff --git a/modules/terraman_2d/world/terrain_2d_world_editor.cpp b/modules/terraman_2d/world/terrain_2d_world_editor.cpp index aa3d16ee8..93e8c3d48 100644 --- a/modules/terraman_2d/world/terrain_2d_world_editor.cpp +++ b/modules/terraman_2d/world/terrain_2d_world_editor.cpp @@ -163,7 +163,7 @@ void Terrain2DWorldEditor::edit(Terrain2DWorld *p_world) { button->set_button_group(_surfaces_button_group); button->set_h_size_flags(SIZE_EXPAND_FILL); - button->CONNECT("button_up", this, Terrain2DWorldEditor, _on_surface_button_pressed); + button->connect("button_up", this, "_on_surface_button_pressed"); _surfaces_vbox_container->add_child(button); @@ -207,7 +207,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) { add_button->set_button_group(_tool_button_group); add_button->set_meta("tool_mode", TOOL_MODE_ADD); - add_button->CONNECT("button_up", this, Terrain2DWorldEditor, _on_tool_button_pressed); + add_button->connect("button_up", this, "_on_tool_button_pressed"); add_button->set_shortcut(ED_SHORTCUT("voxelman_world_editor/add_mode", "Add Mode", KEY_A)); spatial_editor_hb->add_child(add_button); @@ -218,7 +218,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) { remove_button->set_button_group(_tool_button_group); remove_button->set_meta("tool_mode", TOOL_MODE_REMOVE); - remove_button->CONNECT("button_up", this, Terrain2DWorldEditor, _on_tool_button_pressed); + remove_button->connect("button_up", this, "_on_tool_button_pressed"); remove_button->set_shortcut(ED_SHORTCUT("voxelman_world_editor/remove_mode", "Remove Mode", KEY_S)); spatial_editor_hb->add_child(remove_button); @@ -226,7 +226,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) { ToolButton *insert_buton = memnew(ToolButton); insert_buton->set_text("Insert"); - insert_buton->CONNECT("button_up", this, Terrain2DWorldEditor, _on_insert_block_at_camera_button_pressed); + insert_buton->connect("button_up", this, "_on_insert_block_at_camera_button_pressed"); insert_buton->set_shortcut(ED_SHORTCUT("voxelman_world_editor/instert_block_at_camera", "Insert at camera", KEY_B)); spatial_editor_hb->add_child(insert_buton); @@ -241,7 +241,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) { _isolevel_slider->set_v_size_flags(SIZE_EXPAND_FILL); spatial_editor_hb->add_child(_isolevel_slider); - _isolevel_slider->CONNECT("value_changed", this, Terrain2DWorldEditor, _on_isolevel_slider_value_changed); + _isolevel_slider->connect("value_changed", this, "_on_isolevel_slider_value_changed"); _isolevel_slider->hide(); diff --git a/modules/thread_pool/thread_pool.cpp b/modules/thread_pool/thread_pool.cpp index ee58bc647..ac07d3a33 100644 --- a/modules/thread_pool/thread_pool.cpp +++ b/modules/thread_pool/thread_pool.cpp @@ -30,9 +30,6 @@ SOFTWARE. #include "core/os/os.h" #include "scene/main/scene_tree.h" -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - ThreadPool *ThreadPool::_instance; ThreadPool *ThreadPool::get_singleton() { @@ -241,7 +238,7 @@ void ThreadPool::_worker_thread_func(void *user_data) { } void ThreadPool::register_update() { - SceneTree::get_singleton()->CONNECT("idle_frame", this, ThreadPool, update); + SceneTree::get_singleton()->connect("idle_frame", this, "update"); } void ThreadPool::update() { diff --git a/modules/ui_extensions/input_map_editor.cpp b/modules/ui_extensions/input_map_editor.cpp index 8a5d73a47..f0b18de95 100644 --- a/modules/ui_extensions/input_map_editor.cpp +++ b/modules/ui_extensions/input_map_editor.cpp @@ -42,7 +42,6 @@ #include "scene/gui/margin_container.h" #include "core/input_map.h" -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) static const char *_button_names[JOY_BUTTON_MAX] = { "DualShock Cross, Xbox A, Nintendo B", @@ -914,15 +913,15 @@ InputMapEditor::InputMapEditor() { input_editor->set_column_expand(2, false); input_editor->set_column_min_width(2, 50); - input_editor->CONNECT("item_edited", this, InputMapEditor, _action_edited); - input_editor->CONNECT("item_activated", this, InputMapEditor, _action_activated); - input_editor->CONNECT("cell_selected", this, InputMapEditor, _action_selected); - input_editor->CONNECT("button_pressed", this, InputMapEditor, _action_button_pressed); + input_editor->connect("item_edited", this, "_action_edited"); + input_editor->connect("item_activated", this, "_action_activated"); + input_editor->connect("cell_selected", this, "_action_selected"); + input_editor->connect("button_pressed", this, "_action_button_pressed"); input_editor->set_drag_forwarding(this); popup_add = memnew(PopupMenu); add_child(popup_add); - popup_add->CONNECT("id_pressed", this, InputMapEditor, _add_item); + popup_add->connect("id_pressed", this, "_add_item"); press_a_key = memnew(ConfirmationDialog); press_a_key->set_focus_mode(FOCUS_ALL); @@ -941,15 +940,15 @@ InputMapEditor::InputMapEditor() { press_a_key_label = l; press_a_key->add_child(l); - press_a_key->CONNECT("gui_input", this, InputMapEditor, _wait_for_key); - press_a_key->CONNECT("confirmed", this, InputMapEditor, _press_a_key_confirm); + press_a_key->connect("gui_input", this, "_wait_for_key"); + press_a_key->connect("confirmed", this, "_press_a_key_confirm"); device_input = memnew(ConfirmationDialog); add_child(device_input); device_input->get_ok()->set_text("Add"); - device_input->CONNECT("confirmed", this, InputMapEditor, _device_input_add); + device_input->connect("confirmed", this, "_device_input_add"); HBoxContainer *hbc = memnew(HBoxContainer); device_input->add_child(hbc); @@ -985,7 +984,7 @@ InputMapEditor::InputMapEditor() { timer = memnew(Timer); timer->set_wait_time(1.5); - timer->CONNECT("timeout", ProjectSettings::get_singleton(), ProjectSettings, save); + timer->connect("timeout", ProjectSettings::get_singleton(), "save"); timer->set_one_shot(true); add_child(timer); } diff --git a/modules/voxelman/defines.h b/modules/voxelman/defines.h index 741cd8e78..be162d516 100644 --- a/modules/voxelman/defines.h +++ b/modules/voxelman/defines.h @@ -16,7 +16,4 @@ arr_into.push_back(e); \ } -#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method) -#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method) - #endif diff --git a/modules/voxelman/world/voxel_world_editor.cpp b/modules/voxelman/world/voxel_world_editor.cpp index f50c39630..63d7d9b88 100644 --- a/modules/voxelman/world/voxel_world_editor.cpp +++ b/modules/voxelman/world/voxel_world_editor.cpp @@ -164,7 +164,7 @@ void VoxelWorldEditor::edit(VoxelWorld *p_world) { button->set_button_group(_surfaces_button_group); button->set_h_size_flags(SIZE_EXPAND_FILL); - button->CONNECT("button_up", this, VoxelWorldEditor, _on_surface_button_pressed); + button->connect("button_up", this, "_on_surface_button_pressed"); _surfaces_vbox_container->add_child(button); @@ -208,7 +208,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { add_button->set_button_group(_tool_button_group); add_button->set_meta("tool_mode", TOOL_MODE_ADD); - add_button->CONNECT("button_up", this, VoxelWorldEditor, _on_tool_button_pressed); + add_button->connect("button_up", this, "_on_tool_button_pressed"); add_button->set_shortcut(ED_SHORTCUT("voxel_world_editor/add_mode", "Add Mode", KEY_A)); @@ -220,7 +220,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { remove_button->set_button_group(_tool_button_group); remove_button->set_meta("tool_mode", TOOL_MODE_REMOVE); - remove_button->CONNECT("button_up", this, VoxelWorldEditor, _on_tool_button_pressed); + remove_button->connect("button_up", this, "_on_tool_button_pressed"); remove_button->set_shortcut(ED_SHORTCUT("voxel_world_editor/remove_mode", "Remove Mode", KEY_S)); @@ -229,7 +229,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { ToolButton *insert_buton = memnew(ToolButton); insert_buton->set_text("Insert"); - insert_buton->CONNECT("button_up", this, VoxelWorldEditor, _on_insert_block_at_camera_button_pressed); + insert_buton->connect("button_up", this, "_on_insert_block_at_camera_button_pressed"); insert_buton->set_shortcut(ED_SHORTCUT("voxel_world_editor/instert_block_at_camera", "Insert at camera", KEY_B)); @@ -245,7 +245,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) { _isolevel_slider->set_v_size_flags(SIZE_EXPAND_FILL); spatial_editor_hb->add_child(_isolevel_slider); - _isolevel_slider->CONNECT("value_changed", this, VoxelWorldEditor, _on_isolevel_slider_value_changed); + _isolevel_slider->connect("value_changed", this, "_on_isolevel_slider_value_changed"); _isolevel_slider->hide();