Merge pull request #92638 from AThousandShips/item_selected_sname
[Scene] Add `SceneStringNames::item_selected`
This commit is contained in:
commit
1609b275b0
|
@ -7314,7 +7314,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
snap_mode->add_item(TTR("Seconds"));
|
||||
snap_mode->add_item(TTR("FPS"));
|
||||
bottom_hb->add_child(snap_mode);
|
||||
snap_mode->connect("item_selected", callable_mp(this, &AnimationTrackEditor::_snap_mode_changed));
|
||||
snap_mode->connect(SceneStringName(item_selected), callable_mp(this, &AnimationTrackEditor::_snap_mode_changed));
|
||||
snap_mode->set_disabled(true);
|
||||
|
||||
bottom_hb->add_child(memnew(VSeparator));
|
||||
|
|
|
@ -776,7 +776,7 @@ ConnectDialog::ConnectDialog() {
|
|||
method_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
method_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
method_tree->set_hide_root(true);
|
||||
method_tree->connect("item_selected", callable_mp(this, &ConnectDialog::_method_selected));
|
||||
method_tree->connect(SceneStringName(item_selected), callable_mp(this, &ConnectDialog::_method_selected));
|
||||
method_tree->connect("item_activated", callable_mp((Window *)method_popup, &Window::hide));
|
||||
|
||||
empty_tree_label = memnew(Label(TTR("No method found matching given filters.")));
|
||||
|
@ -1641,7 +1641,7 @@ ConnectionsDock::ConnectionsDock() {
|
|||
add_child(slot_menu);
|
||||
|
||||
connect_dialog->connect("connected", callable_mp(this, &ConnectionsDock::_make_or_edit_connection));
|
||||
tree->connect("item_selected", callable_mp(this, &ConnectionsDock::_tree_item_selected));
|
||||
tree->connect(SceneStringName(item_selected), callable_mp(this, &ConnectionsDock::_tree_item_selected));
|
||||
tree->connect("item_activated", callable_mp(this, &ConnectionsDock::_tree_item_activated));
|
||||
tree->connect(SceneStringName(gui_input), callable_mp(this, &ConnectionsDock::_tree_gui_input));
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ CreateDialog::CreateDialog() {
|
|||
recent->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
rec_vb->add_margin_child(TTR("Recent:"), recent, true);
|
||||
recent->set_allow_reselect(true);
|
||||
recent->connect("item_selected", callable_mp(this, &CreateDialog::_history_selected));
|
||||
recent->connect(SceneStringName(item_selected), callable_mp(this, &CreateDialog::_history_selected));
|
||||
recent->connect("item_activated", callable_mp(this, &CreateDialog::_history_activated));
|
||||
recent->add_theme_constant_override("draw_guides", 1);
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ EditorProfiler::EditorProfiler() {
|
|||
display_mode->add_item(TTR("Average Time (ms)"));
|
||||
display_mode->add_item(TTR("Frame %"));
|
||||
display_mode->add_item(TTR("Physics Frame %"));
|
||||
display_mode->connect("item_selected", callable_mp(this, &EditorProfiler::_combo_changed));
|
||||
display_mode->connect(SceneStringName(item_selected), callable_mp(this, &EditorProfiler::_combo_changed));
|
||||
|
||||
hb->add_child(display_mode);
|
||||
|
||||
|
@ -652,7 +652,7 @@ EditorProfiler::EditorProfiler() {
|
|||
// TRANSLATORS: This is an option in the profiler to display the time spent in a function, exincluding the time spent in other functions called by that function.
|
||||
display_time->add_item(TTR("Self"));
|
||||
display_time->set_tooltip_text(TTR("Inclusive: Includes time from other functions called by this function.\nUse this to spot bottlenecks.\n\nSelf: Only count the time spent in the function itself, not in other functions called by that function.\nUse this to find individual functions to optimize."));
|
||||
display_time->connect("item_selected", callable_mp(this, &EditorProfiler::_combo_changed));
|
||||
display_time->connect(SceneStringName(item_selected), callable_mp(this, &EditorProfiler::_combo_changed));
|
||||
|
||||
hb->add_child(display_time);
|
||||
|
||||
|
|
|
@ -750,7 +750,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
|||
display_mode = memnew(OptionButton);
|
||||
display_mode->add_item(TTR("Frame Time (ms)"));
|
||||
display_mode->add_item(TTR("Frame %"));
|
||||
display_mode->connect("item_selected", callable_mp(this, &EditorVisualProfiler::_combo_changed));
|
||||
display_mode->connect(SceneStringName(item_selected), callable_mp(this, &EditorVisualProfiler::_combo_changed));
|
||||
|
||||
hb->add_child(display_mode);
|
||||
|
||||
|
|
|
@ -851,7 +851,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE: {
|
||||
le_set->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
|
||||
le_clear->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
|
||||
error_tree->connect("item_selected", callable_mp(this, &ScriptEditorDebugger::_error_selected));
|
||||
error_tree->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditorDebugger::_error_selected));
|
||||
error_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
|
||||
breakpoints_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_breakpoint_tree_clicked));
|
||||
[[fallthrough]];
|
||||
|
@ -1886,7 +1886,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
|||
threads = memnew(OptionButton);
|
||||
thread_hb->add_child(threads);
|
||||
threads->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
threads->connect("item_selected", callable_mp(this, &ScriptEditorDebugger::_select_thread));
|
||||
threads->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditorDebugger::_select_thread));
|
||||
|
||||
stack_dump = memnew(Tree);
|
||||
stack_dump->set_allow_reselect(true);
|
||||
|
|
|
@ -359,7 +359,7 @@ EditorAbout::EditorAbout() {
|
|||
_tpl_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
tpl_hbc->add_child(_tpl_text);
|
||||
|
||||
_tpl_tree->connect("item_selected", callable_mp(this, &EditorAbout::_license_tree_selected));
|
||||
_tpl_tree->connect(SceneStringName(item_selected), callable_mp(this, &EditorAbout::_license_tree_selected));
|
||||
tpl_ti_all->select(0);
|
||||
_tpl_text->set_text(tpl_ti_all->get_metadata(0));
|
||||
}
|
||||
|
|
|
@ -938,7 +938,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
|||
send = memnew(OptionButton);
|
||||
send->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
send->set_clip_text(true);
|
||||
send->connect("item_selected", callable_mp(this, &EditorAudioBus::_send_selected));
|
||||
send->connect(SceneStringName(item_selected), callable_mp(this, &EditorAudioBus::_send_selected));
|
||||
vb->add_child(send);
|
||||
|
||||
set_focus_mode(FOCUS_CLICK);
|
||||
|
|
|
@ -360,7 +360,7 @@ EditorCommandPalette::EditorCommandPalette() {
|
|||
|
||||
search_options = memnew(Tree);
|
||||
search_options->connect("item_activated", callable_mp(this, &EditorCommandPalette::_confirmed));
|
||||
search_options->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
|
||||
search_options->connect(SceneStringName(item_selected), callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
|
||||
search_options->connect("nothing_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(true));
|
||||
search_options->create_item();
|
||||
search_options->set_hide_root(true);
|
||||
|
|
|
@ -936,7 +936,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
|
|||
profile_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
profile_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
profiles_hbc->add_child(profile_list);
|
||||
profile_list->connect("item_selected", callable_mp(this, &EditorFeatureProfileManager::_profile_selected));
|
||||
profile_list->connect(SceneStringName(item_selected), callable_mp(this, &EditorFeatureProfileManager::_profile_selected));
|
||||
|
||||
profile_actions[PROFILE_NEW] = memnew(Button(TTR("Create Profile")));
|
||||
profiles_hbc->add_child(profile_actions[PROFILE_NEW]);
|
||||
|
|
|
@ -351,7 +351,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
|||
filter_combo->add_item(TTR("Constants Only"), SEARCH_CONSTANTS);
|
||||
filter_combo->add_item(TTR("Properties Only"), SEARCH_PROPERTIES);
|
||||
filter_combo->add_item(TTR("Theme Properties Only"), SEARCH_THEME_ITEMS);
|
||||
filter_combo->connect("item_selected", callable_mp(this, &EditorHelpSearch::_filter_combo_item_selected));
|
||||
filter_combo->connect(SceneStringName(item_selected), callable_mp(this, &EditorHelpSearch::_filter_combo_item_selected));
|
||||
hbox->add_child(filter_combo);
|
||||
|
||||
// Create the results tree.
|
||||
|
@ -369,7 +369,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
|||
results_tree->set_hide_root(true);
|
||||
results_tree->set_select_mode(Tree::SELECT_ROW);
|
||||
results_tree->connect("item_activated", callable_mp(this, &EditorHelpSearch::_confirmed));
|
||||
results_tree->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
|
||||
results_tree->connect(SceneStringName(item_selected), callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
|
||||
vbox->add_child(results_tree, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ EditorLocaleDialog::EditorLocaleDialog() {
|
|||
filter_mode->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
filter_mode->add_item(TTR("Show Selected Locales Only"), SHOW_ONLY_SELECTED_LOCALES);
|
||||
filter_mode->select(0);
|
||||
filter_mode->connect("item_selected", callable_mp(this, &EditorLocaleDialog::_filter_mode_changed));
|
||||
filter_mode->connect(SceneStringName(item_selected), callable_mp(this, &EditorLocaleDialog::_filter_mode_changed));
|
||||
hb_filter->add_child(filter_mode);
|
||||
}
|
||||
{
|
||||
|
|
|
@ -7138,7 +7138,7 @@ EditorNode::EditorNode() {
|
|||
|
||||
// Add the renderers name to the UI.
|
||||
if (current_renderer_ps == current_renderer_os) {
|
||||
renderer->connect("item_selected", callable_mp(this, &EditorNode::_renderer_selected));
|
||||
renderer->connect(SceneStringName(item_selected), callable_mp(this, &EditorNode::_renderer_selected));
|
||||
// As we are doing string comparisons, keep in standard case to prevent problems with capitals
|
||||
// "vulkan" in particular uses lowercase "v" in the code, and uppercase in the UI.
|
||||
PackedStringArray renderers = ProjectSettings::get_singleton()->get_custom_property_info().get(StringName("rendering/renderer/rendering_method")).hint_string.split(",", false);
|
||||
|
@ -7299,7 +7299,7 @@ EditorNode::EditorNode() {
|
|||
vbox->add_child(install_android_build_template_message);
|
||||
|
||||
choose_android_export_profile = memnew(OptionButton);
|
||||
choose_android_export_profile->connect("item_selected", callable_mp(this, &EditorNode::_android_export_preset_selected));
|
||||
choose_android_export_profile->connect(SceneStringName(item_selected), callable_mp(this, &EditorNode::_android_export_preset_selected));
|
||||
vbox->add_child(choose_android_export_profile);
|
||||
|
||||
install_android_build_template = memnew(ConfirmationDialog);
|
||||
|
|
|
@ -376,7 +376,7 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
|
|||
option_button->set_flat(true);
|
||||
option_button->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
default_layout->add_child(option_button);
|
||||
option_button->connect("item_selected", callable_mp(this, &EditorPropertyTextEnum::_option_selected));
|
||||
option_button->connect(SceneStringName(item_selected), callable_mp(this, &EditorPropertyTextEnum::_option_selected));
|
||||
|
||||
edit_button = memnew(Button);
|
||||
edit_button->set_flat(true);
|
||||
|
@ -735,7 +735,7 @@ EditorPropertyEnum::EditorPropertyEnum() {
|
|||
options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
add_child(options);
|
||||
add_focusable(options);
|
||||
options->connect("item_selected", callable_mp(this, &EditorPropertyEnum::_option_selected));
|
||||
options->connect(SceneStringName(item_selected), callable_mp(this, &EditorPropertyEnum::_option_selected));
|
||||
}
|
||||
|
||||
///////////////////// FLAGS /////////////////////////
|
||||
|
|
|
@ -1246,7 +1246,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
presets->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
SET_DRAG_FORWARDING_GCD(presets, ProjectExportDialog);
|
||||
mc->add_child(presets);
|
||||
presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset));
|
||||
presets->connect(SceneStringName(item_selected), callable_mp(this, &ProjectExportDialog::_edit_preset));
|
||||
duplicate_preset = memnew(Button);
|
||||
duplicate_preset->set_tooltip_text(TTR("Duplicate"));
|
||||
duplicate_preset->set_flat(true);
|
||||
|
@ -1328,7 +1328,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
export_filter->add_item(TTR("Export all resources in the project except resources checked below"));
|
||||
export_filter->add_item(TTR("Export as dedicated server"));
|
||||
resources_vb->add_margin_child(TTR("Export Mode:"), export_filter);
|
||||
export_filter->connect("item_selected", callable_mp(this, &ProjectExportDialog::_export_type_changed));
|
||||
export_filter->connect(SceneStringName(item_selected), callable_mp(this, &ProjectExportDialog::_export_type_changed));
|
||||
|
||||
include_label = memnew(Label);
|
||||
include_label->set_text(TTR("Resources to export:"));
|
||||
|
@ -1461,7 +1461,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
script_mode->add_item(TTR("Text (easier debugging)"), (int)EditorExportPreset::MODE_SCRIPT_TEXT);
|
||||
script_mode->add_item(TTR("Binary tokens (faster loading)"), (int)EditorExportPreset::MODE_SCRIPT_BINARY_TOKENS);
|
||||
script_mode->add_item(TTR("Compressed binary tokens (smaller files)"), (int)EditorExportPreset::MODE_SCRIPT_BINARY_TOKENS_COMPRESSED);
|
||||
script_mode->connect("item_selected", callable_mp(this, &ProjectExportDialog::_script_export_mode_changed));
|
||||
script_mode->connect(SceneStringName(item_selected), callable_mp(this, &ProjectExportDialog::_script_export_mode_changed));
|
||||
|
||||
sections->add_child(script_vb);
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ FindInFilesPanel::FindInFilesPanel() {
|
|||
_results_display = memnew(Tree);
|
||||
_results_display->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
_results_display->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
_results_display->connect("item_selected", callable_mp(this, &FindInFilesPanel::_on_result_selected));
|
||||
_results_display->connect(SceneStringName(item_selected), callable_mp(this, &FindInFilesPanel::_on_result_selected));
|
||||
_results_display->connect("item_edited", callable_mp(this, &FindInFilesPanel::_on_item_edited));
|
||||
_results_display->set_hide_root(true);
|
||||
_results_display->set_select_mode(Tree::SELECT_ROW);
|
||||
|
|
|
@ -1786,7 +1786,7 @@ void EditorFileDialog::_update_option_controls() {
|
|||
}
|
||||
ob->select(opt.default_idx);
|
||||
grid_options->add_child(ob);
|
||||
ob->connect("item_selected", callable_mp(this, &EditorFileDialog::_option_changed_item_selected).bind(opt.name));
|
||||
ob->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_option_changed_item_selected).bind(opt.name));
|
||||
selected_options[opt.name] = opt.default_idx;
|
||||
}
|
||||
}
|
||||
|
@ -2173,7 +2173,7 @@ EditorFileDialog::EditorFileDialog() {
|
|||
pathhb->add_child(shortcuts_container);
|
||||
|
||||
drives = memnew(OptionButton);
|
||||
drives->connect("item_selected", callable_mp(this, &EditorFileDialog::_select_drive));
|
||||
drives->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_select_drive));
|
||||
pathhb->add_child(drives);
|
||||
|
||||
pathhb->add_child(memnew(VSeparator));
|
||||
|
@ -2225,7 +2225,7 @@ EditorFileDialog::EditorFileDialog() {
|
|||
favorites->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
fav_vb->add_child(favorites);
|
||||
favorites->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
favorites->connect("item_selected", callable_mp(this, &EditorFileDialog::_favorite_selected));
|
||||
favorites->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_favorite_selected));
|
||||
|
||||
VBoxContainer *rec_vb = memnew(VBoxContainer);
|
||||
vsc->add_child(rec_vb);
|
||||
|
@ -2235,7 +2235,7 @@ EditorFileDialog::EditorFileDialog() {
|
|||
recent->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
recent->set_allow_reselect(true);
|
||||
rec_vb->add_margin_child(TTR("Recent:"), recent, true);
|
||||
recent->connect("item_selected", callable_mp(this, &EditorFileDialog::_recent_selected));
|
||||
recent->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_recent_selected));
|
||||
|
||||
VBoxContainer *item_vb = memnew(VBoxContainer);
|
||||
list_hb->add_child(item_vb);
|
||||
|
@ -2301,13 +2301,13 @@ EditorFileDialog::EditorFileDialog() {
|
|||
_update_drives();
|
||||
|
||||
connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed));
|
||||
item_list->connect("item_selected", callable_mp(this, &EditorFileDialog::_item_selected), CONNECT_DEFERRED);
|
||||
item_list->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_item_selected), CONNECT_DEFERRED);
|
||||
item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), CONNECT_DEFERRED);
|
||||
item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected).bind());
|
||||
item_list->connect("empty_clicked", callable_mp(this, &EditorFileDialog::_items_clear_selection));
|
||||
dir->connect("text_submitted", callable_mp(this, &EditorFileDialog::_dir_submitted));
|
||||
file->connect("text_submitted", callable_mp(this, &EditorFileDialog::_file_submitted));
|
||||
filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected));
|
||||
filter->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_filter_selected));
|
||||
|
||||
confirm_save = memnew(ConfirmationDialog);
|
||||
add_child(confirm_save);
|
||||
|
|
|
@ -262,5 +262,5 @@ HistoryDock::HistoryDock() {
|
|||
action_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
add_child(action_list);
|
||||
action_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
action_list->connect("item_selected", callable_mp(this, &HistoryDock::seek_history));
|
||||
action_list->connect(SceneStringName(item_selected), callable_mp(this, &HistoryDock::seek_history));
|
||||
}
|
||||
|
|
|
@ -1385,7 +1385,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
vars_list->set_column_custom_minimum_width(1, 50 * EDSCALE);
|
||||
vars_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page2_side_vb->add_child(vars_list);
|
||||
vars_list->connect("item_selected", callable_mp(this, &DynamicFontImportSettingsDialog::_variation_selected));
|
||||
vars_list->connect(SceneStringName(item_selected), callable_mp(this, &DynamicFontImportSettingsDialog::_variation_selected));
|
||||
vars_list->connect("button_clicked", callable_mp(this, &DynamicFontImportSettingsDialog::_variation_remove));
|
||||
|
||||
inspector_vars = memnew(EditorInspector);
|
||||
|
@ -1538,7 +1538,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
}
|
||||
glyphs_split->add_child(glyph_tree);
|
||||
glyph_tree->connect("item_activated", callable_mp(this, &DynamicFontImportSettingsDialog::_range_edited));
|
||||
glyph_tree->connect("item_selected", callable_mp(this, &DynamicFontImportSettingsDialog::_range_selected));
|
||||
glyph_tree->connect(SceneStringName(item_selected), callable_mp(this, &DynamicFontImportSettingsDialog::_range_selected));
|
||||
|
||||
// Common
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ ImportDefaultsEditor::ImportDefaultsEditor() {
|
|||
importers = memnew(OptionButton);
|
||||
hb->add_child(importers);
|
||||
hb->add_spacer();
|
||||
importers->connect("item_selected", callable_mp(this, &ImportDefaultsEditor::_importer_selected));
|
||||
importers->connect(SceneStringName(item_selected), callable_mp(this, &ImportDefaultsEditor::_importer_selected));
|
||||
reset_defaults = memnew(Button);
|
||||
reset_defaults->set_text(TTR("Reset to Defaults"));
|
||||
reset_defaults->set_disabled(true);
|
||||
|
|
|
@ -787,7 +787,7 @@ ImportDock::ImportDock() {
|
|||
import_as->set_fit_to_longest_item(false);
|
||||
import_as->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
import_as->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
import_as->connect("item_selected", callable_mp(this, &ImportDock::_importer_selected));
|
||||
import_as->connect(SceneStringName(item_selected), callable_mp(this, &ImportDock::_importer_selected));
|
||||
hb->add_child(import_as);
|
||||
import_as->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
preset = memnew(MenuButton);
|
||||
|
|
|
@ -676,7 +676,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
|||
input_list_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
input_list_tree->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); // Min height for tree
|
||||
input_list_tree->connect("item_activated", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_activated));
|
||||
input_list_tree->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
|
||||
input_list_tree->connect(SceneStringName(item_selected), callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
|
||||
input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
manual_vbox->add_child(input_list_tree);
|
||||
|
||||
|
@ -708,7 +708,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
|||
for (int i = -1; i < 8; i++) {
|
||||
device_id_option->add_item(EventListenerLineEdit::get_device_string(i));
|
||||
}
|
||||
device_id_option->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_device_selection_changed));
|
||||
device_id_option->connect(SceneStringName(item_selected), callable_mp(this, &InputEventConfigurationDialog::_device_selection_changed));
|
||||
_set_current_device(InputMap::ALL_DEVICES);
|
||||
device_container->add_child(device_id_option);
|
||||
|
||||
|
@ -744,7 +744,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
|||
key_mode->add_item(TTR("Keycode (Latin Equivalent)"), KEYMODE_KEYCODE);
|
||||
key_mode->add_item(TTR("Physical Keycode (Position on US QWERTY Keyboard)"), KEYMODE_PHY_KEYCODE);
|
||||
key_mode->add_item(TTR("Key Label (Unicode, Case-Insensitive)"), KEYMODE_UNICODE);
|
||||
key_mode->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_key_mode_selected));
|
||||
key_mode->connect(SceneStringName(item_selected), callable_mp(this, &InputEventConfigurationDialog::_key_mode_selected));
|
||||
key_mode->hide();
|
||||
additional_options_container->add_child(key_mode);
|
||||
|
||||
|
@ -762,7 +762,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
|||
key_location->add_item(TTR("Any"), (int)KeyLocation::UNSPECIFIED);
|
||||
key_location->add_item(TTR("Left"), (int)KeyLocation::LEFT);
|
||||
key_location->add_item(TTR("Right"), (int)KeyLocation::RIGHT);
|
||||
key_location->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_key_location_selected));
|
||||
key_location->connect(SceneStringName(item_selected), callable_mp(this, &InputEventConfigurationDialog::_key_location_selected));
|
||||
|
||||
location_container->add_child(key_location);
|
||||
additional_options_container->add_child(location_container);
|
||||
|
|
|
@ -720,7 +720,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
top_hb->add_child(memnew(Label(TTR("Blend:"))));
|
||||
interpolation = memnew(OptionButton);
|
||||
top_hb->add_child(interpolation);
|
||||
interpolation->connect("item_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
|
||||
interpolation->connect(SceneStringName(item_selected), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
|
||||
|
||||
edit_hb = memnew(HBoxContainer);
|
||||
top_hb->add_child(edit_hb);
|
||||
|
|
|
@ -968,7 +968,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
top_hb->add_child(memnew(Label(TTR("Blend:"))));
|
||||
interpolation = memnew(OptionButton);
|
||||
top_hb->add_child(interpolation);
|
||||
interpolation->connect("item_selected", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
|
||||
interpolation->connect(SceneStringName(item_selected), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
|
||||
|
||||
edit_hb = memnew(HBoxContainer);
|
||||
top_hb->add_child(edit_hb);
|
||||
|
|
|
@ -125,7 +125,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||
|
||||
onion_skinning->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
|
||||
|
||||
blend_editor.next->connect(SNAME("item_selected"), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
|
||||
blend_editor.next->connect(SceneStringName(item_selected), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
|
||||
|
||||
get_tree()->connect(SNAME("node_removed"), callable_mp(this, &AnimationPlayerEditor::_node_removed));
|
||||
|
||||
|
@ -2090,7 +2090,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
play_bw_from->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_play_bw_from_pressed));
|
||||
stop->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_stop_pressed));
|
||||
|
||||
animation->connect(SNAME("item_selected"), callable_mp(this, &AnimationPlayerEditor::_animation_selected));
|
||||
animation->connect(SceneStringName(item_selected), callable_mp(this, &AnimationPlayerEditor::_animation_selected));
|
||||
|
||||
frame->connect(SNAME("value_changed"), callable_mp(this, &AnimationPlayerEditor::_seek_value_changed).bind(false));
|
||||
scale->connect(SNAME("text_submitted"), callable_mp(this, &AnimationPlayerEditor::_scale_changed));
|
||||
|
|
|
@ -1643,7 +1643,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
|
||||
sort->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
sort->set_clip_text(true);
|
||||
sort->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_rerun_search));
|
||||
sort->connect(SceneStringName(item_selected), callable_mp(this, &EditorAssetLibrary::_rerun_search));
|
||||
|
||||
search_hb2->add_child(memnew(VSeparator));
|
||||
|
||||
|
@ -1653,7 +1653,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
search_hb2->add_child(categories);
|
||||
categories->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
categories->set_clip_text(true);
|
||||
categories->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_rerun_search));
|
||||
categories->connect(SceneStringName(item_selected), callable_mp(this, &EditorAssetLibrary::_rerun_search));
|
||||
|
||||
search_hb2->add_child(memnew(VSeparator));
|
||||
|
||||
|
@ -1662,7 +1662,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
|
||||
_update_repository_options();
|
||||
|
||||
repository->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_repository_changed));
|
||||
repository->connect(SceneStringName(item_selected), callable_mp(this, &EditorAssetLibrary::_repository_changed));
|
||||
|
||||
search_hb2->add_child(repository);
|
||||
repository->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
|
@ -214,7 +214,7 @@ EditorPropertyAnchorsPreset::EditorPropertyAnchorsPreset() {
|
|||
options->set_flat(true);
|
||||
add_child(options);
|
||||
add_focusable(options);
|
||||
options->connect("item_selected", callable_mp(this, &EditorPropertyAnchorsPreset::_option_selected));
|
||||
options->connect(SceneStringName(item_selected), callable_mp(this, &EditorPropertyAnchorsPreset::_option_selected));
|
||||
}
|
||||
|
||||
void EditorPropertySizeFlags::_set_read_only(bool p_read_only) {
|
||||
|
@ -397,7 +397,7 @@ EditorPropertySizeFlags::EditorPropertySizeFlags() {
|
|||
vb->add_child(flag_presets);
|
||||
add_focusable(flag_presets);
|
||||
set_label_reference(flag_presets);
|
||||
flag_presets->connect("item_selected", callable_mp(this, &EditorPropertySizeFlags::_preset_selected));
|
||||
flag_presets->connect(SceneStringName(item_selected), callable_mp(this, &EditorPropertySizeFlags::_preset_selected));
|
||||
|
||||
flag_options = memnew(VBoxContainer);
|
||||
flag_options->hide();
|
||||
|
|
|
@ -335,7 +335,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
validation_panel->set_update_callback(callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
|
||||
validation_panel->set_accept_button(get_ok_button());
|
||||
|
||||
script_option_edit->connect("item_selected", callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
|
||||
script_option_edit->connect(SceneStringName(item_selected), callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
|
||||
name_edit->connect("text_changed", callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
|
||||
subfolder_edit->connect("text_changed", callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
|
||||
script_edit->connect("text_changed", callable_mp(validation_panel, &EditorValidationPanel::update).unbind(1));
|
||||
|
|
|
@ -1759,10 +1759,10 @@ void ScriptEditor::_notification(int p_what) {
|
|||
EditorNode::get_singleton()->connect("scene_saved", callable_mp(this, &ScriptEditor::_scene_saved_callback));
|
||||
FileSystemDock::get_singleton()->connect("files_moved", callable_mp(this, &ScriptEditor::_files_moved));
|
||||
FileSystemDock::get_singleton()->connect("file_removed", callable_mp(this, &ScriptEditor::_file_removed));
|
||||
script_list->connect("item_selected", callable_mp(this, &ScriptEditor::_script_selected));
|
||||
script_list->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditor::_script_selected));
|
||||
|
||||
members_overview->connect("item_selected", callable_mp(this, &ScriptEditor::_members_overview_selected));
|
||||
help_overview->connect("item_selected", callable_mp(this, &ScriptEditor::_help_overview_selected));
|
||||
members_overview->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditor::_members_overview_selected));
|
||||
help_overview->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditor::_help_overview_selected));
|
||||
script_split->connect("dragged", callable_mp(this, &ScriptEditor::_split_dragged));
|
||||
list_split->connect("dragged", callable_mp(this, &ScriptEditor::_split_dragged));
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
|
|||
shader_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
shader_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
vb->add_child(shader_list);
|
||||
shader_list->connect("item_selected", callable_mp(this, &ShaderEditorPlugin::_shader_selected));
|
||||
shader_list->connect(SceneStringName(item_selected), callable_mp(this, &ShaderEditorPlugin::_shader_selected));
|
||||
shader_list->connect("item_clicked", callable_mp(this, &ShaderEditorPlugin::_shader_list_clicked));
|
||||
SET_DRAG_FORWARDING_GCD(shader_list, ShaderEditorPlugin);
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ ShaderFileEditor::ShaderFileEditor() {
|
|||
|
||||
versions = memnew(ItemList);
|
||||
versions->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
versions->connect("item_selected", callable_mp(this, &ShaderFileEditor::_version_selected));
|
||||
versions->connect(SceneStringName(item_selected), callable_mp(this, &ShaderFileEditor::_version_selected));
|
||||
versions->set_custom_minimum_size(Size2i(200 * EDSCALE, 0));
|
||||
main_hs->add_child(versions);
|
||||
|
||||
|
|
|
@ -838,7 +838,7 @@ void Skeleton3DEditor::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE: {
|
||||
update_joint_tree();
|
||||
|
||||
joint_tree->connect("item_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed));
|
||||
joint_tree->connect(SceneStringName(item_selected), callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed));
|
||||
joint_tree->connect("item_mouse_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_rmb_select));
|
||||
#ifdef TOOLS_ENABLED
|
||||
skeleton->connect(SceneStringName(pose_updated), callable_mp(this, &Skeleton3DEditor::_draw_gizmo));
|
||||
|
|
|
@ -2091,7 +2091,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_order->add_item(TTR("Top to Bottom, Right to Left"), FRAME_ORDER_TOP_BOTTOM_RIGHT_LEFT);
|
||||
split_sheet_order->add_item(TTR("Bottom to Top, Left to Right"), FRAME_ORDER_BOTTOM_TOP_LEFT_RIGHT);
|
||||
split_sheet_order->add_item(TTR("Bottom to Top, Right to Left"), FRAME_ORDER_BOTTOM_TOP_RIGHT_LEFT);
|
||||
split_sheet_order->connect("item_selected", callable_mp(this, &SpriteFramesEditor::_sheet_order_selected));
|
||||
split_sheet_order->connect(SceneStringName(item_selected), callable_mp(this, &SpriteFramesEditor::_sheet_order_selected));
|
||||
split_sheet_menu_hb->add_child(split_sheet_order);
|
||||
|
||||
Button *select_all = memnew(Button);
|
||||
|
|
|
@ -1138,7 +1138,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
snap_mode_button->add_item(TTR("Grid Snap"), 2);
|
||||
snap_mode_button->add_item(TTR("Auto Slice"), 3);
|
||||
snap_mode_button->select(snap_mode);
|
||||
snap_mode_button->connect("item_selected", callable_mp(this, &TextureRegionEditor::_set_snap_mode));
|
||||
snap_mode_button->connect(SceneStringName(item_selected), callable_mp(this, &TextureRegionEditor::_set_snap_mode));
|
||||
|
||||
hb_grid = memnew(HBoxContainer);
|
||||
hb_tools->add_child(hb_grid);
|
||||
|
|
|
@ -1935,7 +1935,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
edit_type_list->set_columns(1);
|
||||
edit_type_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
edit_dialog_side_vb->add_child(edit_type_list);
|
||||
edit_type_list->connect("item_selected", callable_mp(this, &ThemeItemEditorDialog::_edited_type_selected));
|
||||
edit_type_list->connect(SceneStringName(item_selected), callable_mp(this, &ThemeItemEditorDialog::_edited_type_selected));
|
||||
edit_type_list->connect("button_clicked", callable_mp(this, &ThemeItemEditorDialog::_edited_type_button_pressed));
|
||||
|
||||
Label *edit_add_type_label = memnew(Label);
|
||||
|
@ -2254,7 +2254,7 @@ ThemeTypeDialog::ThemeTypeDialog() {
|
|||
add_type_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
add_type_options->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
add_type_vb->add_child(add_type_options);
|
||||
add_type_options->connect("item_selected", callable_mp(this, &ThemeTypeDialog::_add_type_options_cbk));
|
||||
add_type_options->connect(SceneStringName(item_selected), callable_mp(this, &ThemeTypeDialog::_add_type_options_cbk));
|
||||
add_type_options->connect("item_activated", callable_mp(this, &ThemeTypeDialog::_add_type_dialog_activated));
|
||||
|
||||
add_type_confirmation = memnew(ConfirmationDialog);
|
||||
|
@ -3441,7 +3441,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
|||
theme_type_list->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
theme_type_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
type_list_hb->add_child(theme_type_list);
|
||||
theme_type_list->connect("item_selected", callable_mp(this, &ThemeTypeEditor::_list_type_selected));
|
||||
theme_type_list->connect(SceneStringName(item_selected), callable_mp(this, &ThemeTypeEditor::_list_type_selected));
|
||||
|
||||
add_type_button = memnew(Button);
|
||||
add_type_button->set_tooltip_text(TTR("Add a type from a list of available types or create a new one."));
|
||||
|
|
|
@ -242,7 +242,7 @@ void TileMapLayerEditorTilesPlugin::_update_tile_set_sources_list() {
|
|||
} else {
|
||||
sources_list->set_current(0);
|
||||
}
|
||||
sources_list->emit_signal(SNAME("item_selected"), sources_list->get_current());
|
||||
sources_list->emit_signal(SceneStringName(item_selected), sources_list->get_current());
|
||||
}
|
||||
|
||||
// Synchronize the lists.
|
||||
|
@ -2405,8 +2405,8 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
sources_list->set_stretch_ratio(0.25);
|
||||
sources_list->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
|
||||
sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
|
||||
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(SceneStringName(item_selected), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_source_display).unbind(1));
|
||||
sources_list->connect(SceneStringName(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(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"));
|
||||
|
@ -2471,7 +2471,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
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(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(SceneStringName(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));
|
||||
patterns_bottom_panel->add_child(patterns_item_list);
|
||||
|
@ -3521,7 +3521,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
terrains_tree->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
|
||||
terrains_tree->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
|
||||
terrains_tree->set_hide_root(true);
|
||||
terrains_tree->connect("item_selected", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_tiles_list));
|
||||
terrains_tree->connect(SceneStringName(item_selected), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_tiles_list));
|
||||
tilemap_tab_terrains->add_child(terrains_tree);
|
||||
|
||||
terrains_tile_list = memnew(ItemList);
|
||||
|
@ -4444,7 +4444,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||
layers_selection_button->set_custom_minimum_size(Size2(200, 0));
|
||||
layers_selection_button->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
layers_selection_button->set_tooltip_text(TTR("TileMap Layers"));
|
||||
layers_selection_button->connect("item_selected", callable_mp(this, &TileMapLayerEditor::_layers_selection_item_selected));
|
||||
layers_selection_button->connect(SceneStringName(item_selected), callable_mp(this, &TileMapLayerEditor::_layers_selection_item_selected));
|
||||
layer_selection_hbox->add_child(layers_selection_button);
|
||||
|
||||
select_previous_layer = memnew(Button);
|
||||
|
|
|
@ -2595,7 +2595,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||
tile_data_editors_tree->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
|
||||
tile_data_editors_tree->set_h_scroll_enabled(false);
|
||||
tile_data_editors_tree->set_v_scroll_enabled(false);
|
||||
tile_data_editors_tree->connect("item_selected", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editors_tree_selected));
|
||||
tile_data_editors_tree->connect(SceneStringName(item_selected), callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editors_tree_selected));
|
||||
tile_data_editors_popup->add_child(tile_data_editors_tree);
|
||||
|
||||
tile_data_painting_editor_container = memnew(VBoxContainer);
|
||||
|
|
|
@ -218,7 +218,7 @@ void TileSetEditor::_update_sources_list(int force_selected_id) {
|
|||
sources_list->set_current(i);
|
||||
sources_list->ensure_current_is_visible();
|
||||
if (old_selected != to_select) {
|
||||
sources_list->emit_signal(SNAME("item_selected"), sources_list->get_current());
|
||||
sources_list->emit_signal(SceneStringName(item_selected), sources_list->get_current());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ void TileSetEditor::_update_sources_list(int force_selected_id) {
|
|||
if (sources_list->get_current() < 0 && sources_list->get_item_count() > 0) {
|
||||
sources_list->set_current(0);
|
||||
if (old_selected != int(sources_list->get_item_metadata(0))) {
|
||||
sources_list->emit_signal(SNAME("item_selected"), sources_list->get_current());
|
||||
sources_list->emit_signal(SceneStringName(item_selected), sources_list->get_current());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -861,8 +861,8 @@ TileSetEditor::TileSetEditor() {
|
|||
sources_list->set_fixed_icon_size(Size2(60, 60) * EDSCALE);
|
||||
sources_list->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
sources_list->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected));
|
||||
sources_list->connect("item_selected", callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::set_sources_lists_current));
|
||||
sources_list->connect(SceneStringName(item_selected), callable_mp(this, &TileSetEditor::_source_selected));
|
||||
sources_list->connect(SceneStringName(item_selected), callable_mp(TilesEditorUtils::get_singleton(), &TilesEditorUtils::set_sources_lists_current));
|
||||
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, &TileSetEditor::_update_sources_list).bind(-1));
|
||||
|
|
|
@ -562,8 +562,8 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
|
|||
scene_tiles_list->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
scene_tiles_list->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
SET_DRAG_FORWARDING_CDU(scene_tiles_list, TileSetScenesCollectionSourceEditor);
|
||||
scene_tiles_list->connect("item_selected", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_tile_inspector).unbind(1));
|
||||
scene_tiles_list->connect("item_selected", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
|
||||
scene_tiles_list->connect(SceneStringName(item_selected), callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_tile_inspector).unbind(1));
|
||||
scene_tiles_list->connect(SceneStringName(item_selected), callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
|
||||
scene_tiles_list->connect("item_activated", callable_mp(this, &TileSetScenesCollectionSourceEditor::_scenes_list_item_activated));
|
||||
scene_tiles_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
|
||||
right_vbox_container->add_child(scene_tiles_list);
|
||||
|
|
|
@ -183,7 +183,7 @@ void TilesEditorUtils::synchronize_sources_list(Object *p_current_list, Object *
|
|||
} else {
|
||||
item_list->set_current(atlas_sources_lists_current);
|
||||
item_list->ensure_current_is_visible();
|
||||
item_list->emit_signal(SNAME("item_selected"), atlas_sources_lists_current);
|
||||
item_list->emit_signal(SceneStringName(item_selected), atlas_sources_lists_current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1194,7 +1194,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
unstaged_files->set_h_size_flags(Tree::SIZE_EXPAND_FILL);
|
||||
unstaged_files->set_v_size_flags(Tree::SIZE_EXPAND_FILL);
|
||||
unstaged_files->set_select_mode(Tree::SELECT_ROW);
|
||||
unstaged_files->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(unstaged_files));
|
||||
unstaged_files->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(unstaged_files));
|
||||
unstaged_files->connect(SNAME("item_activated"), callable_mp(this, &VersionControlEditorPlugin::_item_activated).bind(unstaged_files));
|
||||
unstaged_files->connect(SNAME("button_clicked"), callable_mp(this, &VersionControlEditorPlugin::_cell_button_pressed));
|
||||
unstaged_files->create_item();
|
||||
|
@ -1224,7 +1224,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
staged_files->set_h_size_flags(Tree::SIZE_EXPAND_FILL);
|
||||
staged_files->set_v_size_flags(Tree::SIZE_EXPAND_FILL);
|
||||
staged_files->set_select_mode(Tree::SELECT_ROW);
|
||||
staged_files->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(staged_files));
|
||||
staged_files->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(staged_files));
|
||||
staged_files->connect(SNAME("button_clicked"), callable_mp(this, &VersionControlEditorPlugin::_cell_button_pressed));
|
||||
staged_files->connect(SNAME("item_activated"), callable_mp(this, &VersionControlEditorPlugin::_item_activated).bind(staged_files));
|
||||
staged_files->create_item();
|
||||
|
@ -1281,7 +1281,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_list_size_button->set_item_metadata(1, 20);
|
||||
commit_list_size_button->add_item("30");
|
||||
commit_list_size_button->set_item_metadata(2, 30);
|
||||
commit_list_size_button->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_set_commit_list_size));
|
||||
commit_list_size_button->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_set_commit_list_size));
|
||||
commit_list_hbc->add_child(commit_list_size_button);
|
||||
|
||||
commit_list = memnew(Tree);
|
||||
|
@ -1294,7 +1294,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_list->set_columns(2); // Commit msg, author
|
||||
commit_list->set_column_custom_minimum_width(0, 40);
|
||||
commit_list->set_column_custom_minimum_width(1, 20);
|
||||
commit_list->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(commit_list));
|
||||
commit_list->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_load_diff).bind(commit_list));
|
||||
version_commit_dock->add_child(commit_list);
|
||||
|
||||
version_commit_dock->add_child(memnew(HSeparator));
|
||||
|
@ -1307,7 +1307,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
branch_select = memnew(OptionButton);
|
||||
branch_select->set_tooltip_text(TTR("Branches"));
|
||||
branch_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
branch_select->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_branch_item_selected));
|
||||
branch_select->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_branch_item_selected));
|
||||
branch_select->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_branch_list));
|
||||
menu_bar->add_child(branch_select);
|
||||
|
||||
|
@ -1352,7 +1352,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
remote_select = memnew(OptionButton);
|
||||
remote_select->set_tooltip_text(TTR("Remotes"));
|
||||
remote_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_select->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_remote_selected));
|
||||
remote_select->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_remote_selected));
|
||||
remote_select->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_remote_list));
|
||||
menu_bar->add_child(remote_select);
|
||||
|
||||
|
@ -1492,7 +1492,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
diff_view_type_select = memnew(OptionButton);
|
||||
diff_view_type_select->add_item(TTR("Split"), DIFF_VIEW_TYPE_SPLIT);
|
||||
diff_view_type_select->add_item(TTR("Unified"), DIFF_VIEW_TYPE_UNIFIED);
|
||||
diff_view_type_select->connect(SNAME("item_selected"), callable_mp(this, &VersionControlEditorPlugin::_display_diff));
|
||||
diff_view_type_select->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_display_diff));
|
||||
diff_heading->add_child(diff_view_type_select);
|
||||
|
||||
diff = memnew(RichTextLabel);
|
||||
|
|
|
@ -876,7 +876,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
OptionButton *op = memnew(OptionButton);
|
||||
hbox->add_child(op);
|
||||
op->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
op->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_set_custom_node_option).bind(p_id, i), CONNECT_DEFERRED);
|
||||
op->connect(SceneStringName(item_selected), callable_mp(editor, &VisualShaderEditor::_set_custom_node_option).bind(p_id, i), CONNECT_DEFERRED);
|
||||
|
||||
for (const String &s : dp.options) {
|
||||
op->add_item(s);
|
||||
|
@ -1124,7 +1124,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
type_box->add_item(TTR("Sampler"));
|
||||
type_box->select(group_node->get_input_port_type(j));
|
||||
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
|
||||
type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_input_port_type).bind(p_id, j), CONNECT_DEFERRED);
|
||||
type_box->connect(SceneStringName(item_selected), callable_mp(editor, &VisualShaderEditor::_change_input_port_type).bind(p_id, j), CONNECT_DEFERRED);
|
||||
|
||||
LineEdit *name_box = memnew(LineEdit);
|
||||
hb->add_child(name_box);
|
||||
|
@ -1188,7 +1188,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
type_box->add_item(TTR("Transform"));
|
||||
type_box->select(group_node->get_output_port_type(i));
|
||||
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
|
||||
type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
|
||||
type_box->connect(SceneStringName(item_selected), callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
|
||||
} else {
|
||||
Label *label = memnew(Label);
|
||||
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
|
||||
|
@ -6150,24 +6150,24 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
edit_type_standard->add_item(TTR("Fragment"));
|
||||
edit_type_standard->add_item(TTR("Light"));
|
||||
edit_type_standard->select(1);
|
||||
edit_type_standard->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
edit_type_standard->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
|
||||
edit_type_particles = memnew(OptionButton);
|
||||
edit_type_particles->add_item(TTR("Start"));
|
||||
edit_type_particles->add_item(TTR("Process"));
|
||||
edit_type_particles->add_item(TTR("Collide"));
|
||||
edit_type_particles->select(0);
|
||||
edit_type_particles->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
edit_type_particles->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
|
||||
edit_type_sky = memnew(OptionButton);
|
||||
edit_type_sky->add_item(TTR("Sky"));
|
||||
edit_type_sky->select(0);
|
||||
edit_type_sky->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
edit_type_sky->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
|
||||
edit_type_fog = memnew(OptionButton);
|
||||
edit_type_fog->add_item(TTR("Fog"));
|
||||
edit_type_fog->select(0);
|
||||
edit_type_fog->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
edit_type_fog->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_mode_selected));
|
||||
|
||||
edit_type = edit_type_standard;
|
||||
|
||||
|
@ -6300,7 +6300,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
members->set_hide_folding(false);
|
||||
members->set_custom_minimum_size(Size2(180 * EDSCALE, 200 * EDSCALE));
|
||||
members->connect("item_activated", callable_mp(this, &VisualShaderEditor::_member_create));
|
||||
members->connect("item_selected", callable_mp(this, &VisualShaderEditor::_member_selected));
|
||||
members->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_member_selected));
|
||||
members->connect("nothing_selected", callable_mp(this, &VisualShaderEditor::_member_unselected));
|
||||
|
||||
HBoxContainer *desc_hbox = memnew(HBoxContainer);
|
||||
|
@ -6403,7 +6403,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
varyings->set_hide_folding(false);
|
||||
varyings->set_custom_minimum_size(Size2(180 * EDSCALE, 200 * EDSCALE));
|
||||
varyings->connect("item_activated", callable_mp(this, &VisualShaderEditor::_varying_deleted));
|
||||
varyings->connect("item_selected", callable_mp(this, &VisualShaderEditor::_varying_selected));
|
||||
varyings->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_varying_selected));
|
||||
varyings->connect("nothing_selected", callable_mp(this, &VisualShaderEditor::_varying_unselected));
|
||||
}
|
||||
|
||||
|
@ -7133,7 +7133,7 @@ public:
|
|||
void _notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_READY: {
|
||||
connect("item_selected", callable_mp(this, &VisualShaderNodePluginInputEditor::_item_selected));
|
||||
connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderNodePluginInputEditor::_item_selected));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -7183,7 +7183,7 @@ class VisualShaderNodePluginVaryingEditor : public OptionButton {
|
|||
public:
|
||||
void _notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
connect("item_selected", callable_mp(this, &VisualShaderNodePluginVaryingEditor::_item_selected));
|
||||
connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderNodePluginVaryingEditor::_item_selected));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7262,7 +7262,7 @@ public:
|
|||
void _notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_READY: {
|
||||
connect("item_selected", callable_mp(this, &VisualShaderNodePluginParameterRefEditor::_item_selected));
|
||||
connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderNodePluginParameterRefEditor::_item_selected));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -7648,7 +7648,7 @@ EditorPropertyVisualShaderMode::EditorPropertyVisualShaderMode() {
|
|||
options->set_clip_text(true);
|
||||
add_child(options);
|
||||
add_focusable(options);
|
||||
options->connect("item_selected", callable_mp(this, &EditorPropertyVisualShaderMode::_option_selected));
|
||||
options->connect(SceneStringName(item_selected), callable_mp(this, &EditorPropertyVisualShaderMode::_option_selected));
|
||||
}
|
||||
|
||||
bool EditorInspectorVisualShaderModePlugin::can_handle(Object *p_object) {
|
||||
|
|
|
@ -1253,7 +1253,7 @@ ProjectManager::ProjectManager() {
|
|||
filter_option->set_clip_text(true);
|
||||
filter_option->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
filter_option->set_stretch_ratio(0.3);
|
||||
filter_option->connect("item_selected", callable_mp(this, &ProjectManager::_on_order_option_changed));
|
||||
filter_option->connect(SceneStringName(item_selected), callable_mp(this, &ProjectManager::_on_order_option_changed));
|
||||
hb->add_child(filter_option);
|
||||
|
||||
Vector<String> sort_filter_titles;
|
||||
|
|
|
@ -221,7 +221,7 @@ QuickSettingsDialog::QuickSettingsDialog() {
|
|||
{
|
||||
language_option_button = memnew(OptionButton);
|
||||
language_option_button->set_fit_to_longest_item(false);
|
||||
language_option_button->connect("item_selected", callable_mp(this, &QuickSettingsDialog::_language_selected));
|
||||
language_option_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_language_selected));
|
||||
|
||||
for (int i = 0; i < editor_languages.size(); i++) {
|
||||
const String &lang_value = editor_languages[i];
|
||||
|
@ -237,7 +237,7 @@ QuickSettingsDialog::QuickSettingsDialog() {
|
|||
{
|
||||
theme_option_button = memnew(OptionButton);
|
||||
theme_option_button->set_fit_to_longest_item(false);
|
||||
theme_option_button->connect("item_selected", callable_mp(this, &QuickSettingsDialog::_theme_selected));
|
||||
theme_option_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_theme_selected));
|
||||
|
||||
for (int i = 0; i < editor_themes.size(); i++) {
|
||||
const String &theme_value = editor_themes[i];
|
||||
|
@ -260,7 +260,7 @@ QuickSettingsDialog::QuickSettingsDialog() {
|
|||
{
|
||||
scale_option_button = memnew(OptionButton);
|
||||
scale_option_button->set_fit_to_longest_item(false);
|
||||
scale_option_button->connect("item_selected", callable_mp(this, &QuickSettingsDialog::_scale_selected));
|
||||
scale_option_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_scale_selected));
|
||||
|
||||
for (int i = 0; i < editor_scales.size(); i++) {
|
||||
const String &scale_value = editor_scales[i];
|
||||
|
@ -274,7 +274,7 @@ QuickSettingsDialog::QuickSettingsDialog() {
|
|||
{
|
||||
network_mode_option_button = memnew(OptionButton);
|
||||
network_mode_option_button->set_fit_to_longest_item(false);
|
||||
network_mode_option_button->connect("item_selected", callable_mp(this, &QuickSettingsDialog::_network_mode_selected));
|
||||
network_mode_option_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_network_mode_selected));
|
||||
|
||||
for (int i = 0; i < editor_network_modes.size(); i++) {
|
||||
const String &network_mode_value = editor_network_modes[i];
|
||||
|
|
|
@ -673,7 +673,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
|
|||
|
||||
feature_box = memnew(OptionButton);
|
||||
feature_box->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
|
||||
feature_box->connect("item_selected", callable_mp(this, &ProjectSettingsEditor::_feature_selected));
|
||||
feature_box->connect(SceneStringName(item_selected), callable_mp(this, &ProjectSettingsEditor::_feature_selected));
|
||||
custom_properties->add_child(feature_box);
|
||||
|
||||
type_box = memnew(OptionButton);
|
||||
|
|
|
@ -326,8 +326,8 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor) {
|
|||
spn_count_start->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
spn_count_step->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
spn_count_padding->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
opt_style->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
opt_case->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
opt_style->connect(SceneStringName(item_selected), callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
opt_case->connect(SceneStringName(item_selected), callable_mp(this, &RenameDialog::_update_preview_int));
|
||||
cbut_substitute->connect(SceneStringName(pressed), callable_mp(this, &RenameDialog::_update_preview).bind(""));
|
||||
cbut_regex->connect(SceneStringName(pressed), callable_mp(this, &RenameDialog::_update_preview).bind(""));
|
||||
cbut_process->connect(SceneStringName(pressed), callable_mp(this, &RenameDialog::_update_preview).bind(""));
|
||||
|
|
|
@ -871,7 +871,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
|
|||
language_menu->select(default_language);
|
||||
}
|
||||
|
||||
language_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_language_changed));
|
||||
language_menu->connect(SceneStringName(item_selected), callable_mp(this, &ScriptCreateDialog::_language_changed));
|
||||
|
||||
/* Inherits */
|
||||
|
||||
|
@ -907,7 +907,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
|
|||
|
||||
template_menu = memnew(OptionButton);
|
||||
template_menu->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
template_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_template_changed));
|
||||
template_menu->connect(SceneStringName(item_selected), callable_mp(this, &ScriptCreateDialog::_template_changed));
|
||||
template_hb->add_child(template_menu);
|
||||
|
||||
gc->add_child(template_hb);
|
||||
|
|
|
@ -606,7 +606,7 @@ ShaderCreateDialog::ShaderCreateDialog() {
|
|||
type_menu->select(default_type);
|
||||
}
|
||||
current_type = default_type;
|
||||
type_menu->connect("item_selected", callable_mp(this, &ShaderCreateDialog::_type_changed));
|
||||
type_menu->connect(SceneStringName(item_selected), callable_mp(this, &ShaderCreateDialog::_type_changed));
|
||||
|
||||
// Modes.
|
||||
|
||||
|
@ -616,14 +616,14 @@ ShaderCreateDialog::ShaderCreateDialog() {
|
|||
}
|
||||
gc->add_child(memnew(Label(TTR("Mode:"))));
|
||||
gc->add_child(mode_menu);
|
||||
mode_menu->connect("item_selected", callable_mp(this, &ShaderCreateDialog::_mode_changed));
|
||||
mode_menu->connect(SceneStringName(item_selected), callable_mp(this, &ShaderCreateDialog::_mode_changed));
|
||||
|
||||
// Templates.
|
||||
|
||||
template_menu = memnew(OptionButton);
|
||||
gc->add_child(memnew(Label(TTR("Template:"))));
|
||||
gc->add_child(template_menu);
|
||||
template_menu->connect("item_selected", callable_mp(this, &ShaderCreateDialog::_template_changed));
|
||||
template_menu->connect(SceneStringName(item_selected), callable_mp(this, &ShaderCreateDialog::_template_changed));
|
||||
|
||||
// Built-in Shader.
|
||||
|
||||
|
|
|
@ -1069,7 +1069,7 @@ void GridMapEditor::_update_theme() {
|
|||
void GridMapEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
mesh_library_palette->connect("item_selected", callable_mp(this, &GridMapEditor::_item_selected_cbk));
|
||||
mesh_library_palette->connect(SceneStringName(item_selected), callable_mp(this, &GridMapEditor::_item_selected_cbk));
|
||||
for (int i = 0; i < 3; i++) {
|
||||
grid[i] = RS::get_singleton()->mesh_create();
|
||||
grid_instance[i] = RS::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world_3d()->get_scenario());
|
||||
|
|
|
@ -351,18 +351,18 @@ AudioStreamInteractiveTransitionEditor::AudioStreamInteractiveTransitionEditor()
|
|||
transition_from->add_item(TTR("Next Bar"), AudioStreamInteractive::TRANSITION_FROM_TIME_NEXT_BAR);
|
||||
transition_from->add_item(TTR("Clip End"), AudioStreamInteractive::TRANSITION_FROM_TIME_END);
|
||||
|
||||
transition_from->connect("item_selected", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
transition_from->connect(SceneStringName(item_selected), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
|
||||
transition_to = memnew(OptionButton);
|
||||
edit_vb->add_margin_child(TTR("Transition To:"), transition_to);
|
||||
transition_to->add_item(TTR("Same Position"), AudioStreamInteractive::TRANSITION_TO_TIME_SAME_POSITION);
|
||||
transition_to->add_item(TTR("Clip Start"), AudioStreamInteractive::TRANSITION_TO_TIME_START);
|
||||
transition_to->add_item(TTR("Prev Position"), AudioStreamInteractive::TRANSITION_TO_TIME_PREVIOUS_POSITION);
|
||||
transition_to->connect("item_selected", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
transition_to->connect(SceneStringName(item_selected), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
|
||||
fade_mode = memnew(OptionButton);
|
||||
edit_vb->add_margin_child(TTR("Fade Mode:"), fade_mode);
|
||||
fade_mode->connect("item_selected", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
fade_mode->connect(SceneStringName(item_selected), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
|
||||
fade_beats = memnew(SpinBox);
|
||||
edit_vb->add_margin_child(TTR("Fade Beats:"), fade_beats);
|
||||
|
@ -373,7 +373,7 @@ AudioStreamInteractiveTransitionEditor::AudioStreamInteractiveTransitionEditor()
|
|||
filler_clip = memnew(OptionButton);
|
||||
edit_vb->add_margin_child(TTR("Filler Clip:"), filler_clip);
|
||||
filler_clip->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
filler_clip->connect("item_selected", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
filler_clip->connect(SceneStringName(item_selected), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited).unbind(1));
|
||||
|
||||
hold_previous = memnew(CheckBox);
|
||||
hold_previous->set_text(TTR("Enabled"));
|
||||
|
|
|
@ -152,7 +152,7 @@ OpenXRActionEditor::OpenXRActionEditor(Ref<OpenXRAction> p_action) {
|
|||
action_type_button->add_item("Haptic", OpenXRAction::OPENXR_ACTION_HAPTIC);
|
||||
action_type_button->select(int(action->get_action_type()));
|
||||
action_type_button->set_custom_minimum_size(Size2(100.0, 0.0));
|
||||
action_type_button->connect("item_selected", callable_mp(this, &OpenXRActionEditor::_on_item_selected));
|
||||
action_type_button->connect(SceneStringName(item_selected), callable_mp(this, &OpenXRActionEditor::_on_item_selected));
|
||||
add_child(action_type_button);
|
||||
|
||||
// maybe add dropdown to edit our toplevel paths, or do we deduce them from our suggested bindings?
|
||||
|
|
|
@ -98,11 +98,11 @@ void OpenXRSelectRuntime::_notification(int p_notification) {
|
|||
_update_items();
|
||||
|
||||
// Connect signal
|
||||
connect("item_selected", callable_mp(this, &OpenXRSelectRuntime::_item_selected));
|
||||
connect(SceneStringName(item_selected), callable_mp(this, &OpenXRSelectRuntime::_item_selected));
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
// Disconnect signal
|
||||
disconnect("item_selected", callable_mp(this, &OpenXRSelectRuntime::_item_selected));
|
||||
disconnect(SceneStringName(item_selected), callable_mp(this, &OpenXRSelectRuntime::_item_selected));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1152,7 +1152,7 @@ void FileDialog::_update_option_controls() {
|
|||
}
|
||||
ob->select(opt.default_idx);
|
||||
grid_options->add_child(ob);
|
||||
ob->connect("item_selected", callable_mp(this, &FileDialog::_option_changed_item_selected).bind(opt.name));
|
||||
ob->connect(SceneStringName(item_selected), callable_mp(this, &FileDialog::_option_changed_item_selected).bind(opt.name));
|
||||
selected_options[opt.name] = opt.default_idx;
|
||||
}
|
||||
}
|
||||
|
@ -1421,7 +1421,7 @@ FileDialog::FileDialog() {
|
|||
hbc->add_child(drives_container);
|
||||
|
||||
drives = memnew(OptionButton);
|
||||
drives->connect("item_selected", callable_mp(this, &FileDialog::_select_drive));
|
||||
drives->connect(SceneStringName(item_selected), callable_mp(this, &FileDialog::_select_drive));
|
||||
hbc->add_child(drives);
|
||||
|
||||
dir = memnew(LineEdit);
|
||||
|
@ -1493,7 +1493,7 @@ FileDialog::FileDialog() {
|
|||
tree->connect("nothing_selected", callable_mp(this, &FileDialog::deselect_all));
|
||||
dir->connect("text_submitted", callable_mp(this, &FileDialog::_dir_submitted));
|
||||
file->connect("text_submitted", callable_mp(this, &FileDialog::_file_submitted));
|
||||
filter->connect("item_selected", callable_mp(this, &FileDialog::_filter_selected));
|
||||
filter->connect(SceneStringName(item_selected), callable_mp(this, &FileDialog::_filter_selected));
|
||||
|
||||
confirm_save = memnew(ConfirmationDialog);
|
||||
add_child(confirm_save, false, INTERNAL_MODE_FRONT);
|
||||
|
|
|
@ -733,7 +733,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
select(i, select_mode == SELECT_SINGLE || !mb->is_command_or_control_pressed());
|
||||
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), i);
|
||||
emit_signal(SceneStringName(item_selected), i);
|
||||
} else {
|
||||
emit_signal(SNAME("multi_selected"), i, true);
|
||||
}
|
||||
|
@ -775,7 +775,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(i);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -798,7 +798,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(next);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(i);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -835,7 +835,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(next);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(index);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
break;
|
||||
|
@ -863,7 +863,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(index);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
|
||||
|
@ -886,7 +886,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(next);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(next);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
@ -962,7 +962,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) {
|
|||
set_current(i);
|
||||
ensure_current_is_visible();
|
||||
if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -395,7 +395,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
|
|||
}
|
||||
|
||||
if (is_inside_tree() && p_emit) {
|
||||
emit_signal(SNAME("item_selected"), current);
|
||||
emit_signal(SceneStringName(item_selected), current);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2693,7 +2693,7 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
|
|||
c.selected = true;
|
||||
selected_item = p_selected;
|
||||
if (!emitted_row) {
|
||||
emit_signal(SNAME("item_selected"));
|
||||
emit_signal(SceneStringName(item_selected));
|
||||
emitted_row = true;
|
||||
}
|
||||
} else if (c.selected) {
|
||||
|
@ -2717,7 +2717,7 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
|
|||
if (select_mode == SELECT_MULTI) {
|
||||
emit_signal(SNAME("multi_selected"), p_current, i, true);
|
||||
} else if (select_mode == SELECT_SINGLE) {
|
||||
emit_signal(SNAME("item_selected"));
|
||||
emit_signal(SceneStringName(item_selected));
|
||||
}
|
||||
|
||||
} else if (select_mode == SELECT_MULTI && (selected_item != p_selected || selected_col != i)) {
|
||||
|
|
|
@ -134,4 +134,6 @@ SceneStringNames::SceneStringNames() {
|
|||
id_pressed = StaticCString::create("id_pressed");
|
||||
|
||||
panel = StaticCString::create("panel");
|
||||
|
||||
item_selected = StaticCString::create("item_selected");
|
||||
}
|
||||
|
|
|
@ -147,6 +147,8 @@ public:
|
|||
StringName id_pressed;
|
||||
|
||||
StringName panel;
|
||||
|
||||
StringName item_selected;
|
||||
};
|
||||
|
||||
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name
|
||||
|
|
Loading…
Reference in New Issue