You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Use Core/Scene stringnames consistently
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user