mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 11:32:13 +00:00
[Scene] Add SceneStringNames::pressed
This commit is contained in:
parent
78cce1954d
commit
ee79386f7b
@ -552,8 +552,8 @@ ActionMapEditor::ActionMapEditor() {
|
||||
|
||||
Button *clear_all_search = memnew(Button);
|
||||
clear_all_search->set_text(TTR("Clear All"));
|
||||
clear_all_search->connect("pressed", callable_mp(action_list_search_by_event, &EventListenerLineEdit::clear_event));
|
||||
clear_all_search->connect("pressed", callable_mp(action_list_search, &LineEdit::clear));
|
||||
clear_all_search->connect(SceneStringName(pressed), callable_mp(action_list_search_by_event, &EventListenerLineEdit::clear_event));
|
||||
clear_all_search->connect(SceneStringName(pressed), callable_mp(action_list_search, &LineEdit::clear));
|
||||
top_hbox->add_child(clear_all_search);
|
||||
|
||||
// Adding Action line edit + button
|
||||
@ -570,7 +570,7 @@ ActionMapEditor::ActionMapEditor() {
|
||||
|
||||
add_button = memnew(Button);
|
||||
add_button->set_text(TTR("Add"));
|
||||
add_button->connect("pressed", callable_mp(this, &ActionMapEditor::_add_action_pressed));
|
||||
add_button->connect(SceneStringName(pressed), callable_mp(this, &ActionMapEditor::_add_action_pressed));
|
||||
add_hbox->add_child(add_button);
|
||||
// Disable the button and set its tooltip.
|
||||
_add_edit_text_changed(add_edit->get_text());
|
||||
|
@ -1924,7 +1924,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
|
||||
loop = memnew(Button);
|
||||
loop->set_flat(true);
|
||||
loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
loop->connect("pressed", callable_mp(this, &AnimationTimelineEdit::_anim_loop_pressed));
|
||||
loop->connect(SceneStringName(pressed), callable_mp(this, &AnimationTimelineEdit::_anim_loop_pressed));
|
||||
loop->set_toggle_mode(true);
|
||||
len_hb->add_child(loop);
|
||||
add_child(len_hb);
|
||||
@ -7226,21 +7226,21 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
imported_anim_warning->hide();
|
||||
imported_anim_warning->set_text(TTR("Imported Scene"));
|
||||
imported_anim_warning->set_tooltip_text(TTR("Warning: Editing imported animation"));
|
||||
imported_anim_warning->connect("pressed", callable_mp(this, &AnimationTrackEditor::_show_imported_anim_warning));
|
||||
imported_anim_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_imported_anim_warning));
|
||||
bottom_hb->add_child(imported_anim_warning);
|
||||
|
||||
dummy_player_warning = memnew(Button);
|
||||
dummy_player_warning->hide();
|
||||
dummy_player_warning->set_text(TTR("Dummy Player"));
|
||||
dummy_player_warning->set_tooltip_text(TTR("Warning: Editing dummy AnimationPlayer"));
|
||||
dummy_player_warning->connect("pressed", callable_mp(this, &AnimationTrackEditor::_show_dummy_player_warning));
|
||||
dummy_player_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_dummy_player_warning));
|
||||
bottom_hb->add_child(dummy_player_warning);
|
||||
|
||||
inactive_player_warning = memnew(Button);
|
||||
inactive_player_warning->hide();
|
||||
inactive_player_warning->set_text(TTR("Inactive Player"));
|
||||
inactive_player_warning->set_tooltip_text(TTR("Warning: AnimationPlayer is inactive"));
|
||||
inactive_player_warning->connect("pressed", callable_mp(this, &AnimationTrackEditor::_show_inactive_player_warning));
|
||||
inactive_player_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_inactive_player_warning));
|
||||
bottom_hb->add_child(inactive_player_warning);
|
||||
|
||||
bottom_hb->add_spacer();
|
||||
@ -7249,14 +7249,14 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
bezier_edit_icon->set_flat(true);
|
||||
bezier_edit_icon->set_disabled(true);
|
||||
bezier_edit_icon->set_toggle_mode(true);
|
||||
bezier_edit_icon->connect("pressed", callable_mp(this, &AnimationTrackEditor::_toggle_bezier_edit));
|
||||
bezier_edit_icon->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_toggle_bezier_edit));
|
||||
bezier_edit_icon->set_tooltip_text(TTR("Toggle between the bezier curve editor and track editor."));
|
||||
|
||||
bottom_hb->add_child(bezier_edit_icon);
|
||||
|
||||
selected_filter = memnew(Button);
|
||||
selected_filter->set_flat(true);
|
||||
selected_filter->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); // Same function works the same.
|
||||
selected_filter->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); // Same function works the same.
|
||||
selected_filter->set_toggle_mode(true);
|
||||
selected_filter->set_tooltip_text(TTR("Only show tracks from nodes selected in tree."));
|
||||
|
||||
@ -7264,7 +7264,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
|
||||
view_group = memnew(Button);
|
||||
view_group->set_flat(true);
|
||||
view_group->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle));
|
||||
view_group->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_view_group_toggle));
|
||||
view_group->set_toggle_mode(true);
|
||||
view_group->set_tooltip_text(TTR("Group tracks by node or display them as plain list."));
|
||||
|
||||
@ -7314,14 +7314,14 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
|
||||
auto_fit = memnew(Button);
|
||||
auto_fit->set_flat(true);
|
||||
auto_fit->connect("pressed", callable_mp(this, &AnimationTrackEditor::_auto_fit));
|
||||
auto_fit->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_auto_fit));
|
||||
auto_fit->set_shortcut(ED_SHORTCUT("animation_editor/auto_fit", TTR("Fit to panel"), KeyModifierMask::ALT | Key::F));
|
||||
bottom_hb->add_child(auto_fit);
|
||||
|
||||
auto_fit_bezier = memnew(Button);
|
||||
auto_fit_bezier->set_flat(true);
|
||||
auto_fit_bezier->set_visible(false);
|
||||
auto_fit_bezier->connect("pressed", callable_mp(this, &AnimationTrackEditor::_auto_fit_bezier));
|
||||
auto_fit_bezier->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_auto_fit_bezier));
|
||||
auto_fit_bezier->set_shortcut(ED_SHORTCUT("animation_editor/auto_fit", TTR("Fit to panel"), KeyModifierMask::ALT | Key::F));
|
||||
bottom_hb->add_child(auto_fit_bezier);
|
||||
|
||||
@ -7572,7 +7572,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
|
||||
Button *select_all_button = memnew(Button);
|
||||
select_all_button->set_text(TTR("Select All/None"));
|
||||
select_all_button->connect("pressed", callable_mp(this, &AnimationTrackEditor::_select_all_tracks_for_copy));
|
||||
select_all_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_select_all_tracks_for_copy));
|
||||
track_copy_vbox->add_child(select_all_button);
|
||||
|
||||
track_copy_select = memnew(Tree);
|
||||
|
@ -721,14 +721,14 @@ FindReplaceBar::FindReplaceBar() {
|
||||
find_prev->set_tooltip_text(TTR("Previous Match"));
|
||||
hbc_button_search->add_child(find_prev);
|
||||
find_prev->set_focus_mode(FOCUS_NONE);
|
||||
find_prev->connect("pressed", callable_mp(this, &FindReplaceBar::search_prev));
|
||||
find_prev->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::search_prev));
|
||||
|
||||
find_next = memnew(Button);
|
||||
find_next->set_flat(true);
|
||||
find_next->set_tooltip_text(TTR("Next Match"));
|
||||
hbc_button_search->add_child(find_next);
|
||||
find_next->set_focus_mode(FOCUS_NONE);
|
||||
find_next->connect("pressed", callable_mp(this, &FindReplaceBar::search_next));
|
||||
find_next->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::search_next));
|
||||
|
||||
case_sensitive = memnew(CheckBox);
|
||||
hbc_option_search->add_child(case_sensitive);
|
||||
@ -754,12 +754,12 @@ FindReplaceBar::FindReplaceBar() {
|
||||
replace = memnew(Button);
|
||||
hbc_button_replace->add_child(replace);
|
||||
replace->set_text(TTR("Replace"));
|
||||
replace->connect("pressed", callable_mp(this, &FindReplaceBar::_replace));
|
||||
replace->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::_replace));
|
||||
|
||||
replace_all = memnew(Button);
|
||||
hbc_button_replace->add_child(replace_all);
|
||||
replace_all->set_text(TTR("Replace All"));
|
||||
replace_all->connect("pressed", callable_mp(this, &FindReplaceBar::_replace_all));
|
||||
replace_all->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::_replace_all));
|
||||
|
||||
selection_only = memnew(CheckBox);
|
||||
hbc_option_replace->add_child(selection_only);
|
||||
@ -771,7 +771,7 @@ FindReplaceBar::FindReplaceBar() {
|
||||
add_child(hide_button);
|
||||
hide_button->set_tooltip_text(TTR("Hide"));
|
||||
hide_button->set_focus_mode(FOCUS_NONE);
|
||||
hide_button->connect("pressed", callable_mp(this, &FindReplaceBar::_hide_bar).bind(false));
|
||||
hide_button->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::_hide_bar).bind(false));
|
||||
hide_button->set_v_size_flags(SIZE_SHRINK_CENTER);
|
||||
}
|
||||
|
||||
@ -1713,7 +1713,7 @@ CodeTextEditor::CodeTextEditor() {
|
||||
toggle_scripts_button = memnew(Button);
|
||||
toggle_scripts_button->set_flat(true);
|
||||
toggle_scripts_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
toggle_scripts_button->connect("pressed", callable_mp(this, &CodeTextEditor::_toggle_scripts_pressed));
|
||||
toggle_scripts_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_toggle_scripts_pressed));
|
||||
status_bar->add_child(toggle_scripts_button);
|
||||
toggle_scripts_button->hide();
|
||||
|
||||
@ -1736,7 +1736,7 @@ CodeTextEditor::CodeTextEditor() {
|
||||
status_bar->add_child(error_button);
|
||||
error_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
error_button->set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||
error_button->connect("pressed", callable_mp(this, &CodeTextEditor::_error_button_pressed));
|
||||
error_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_error_button_pressed));
|
||||
error_button->set_tooltip_text(TTR("Errors"));
|
||||
set_error_count(0);
|
||||
|
||||
@ -1746,7 +1746,7 @@ CodeTextEditor::CodeTextEditor() {
|
||||
status_bar->add_child(warning_button);
|
||||
warning_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
warning_button->set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||
warning_button->connect("pressed", callable_mp(this, &CodeTextEditor::_warning_button_pressed));
|
||||
warning_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_warning_button_pressed));
|
||||
warning_button->set_tooltip_text(TTR("Warnings"));
|
||||
set_warning_count(0);
|
||||
|
||||
|
@ -721,7 +721,7 @@ ConnectDialog::ConnectDialog() {
|
||||
Button *focus_current = memnew(Button);
|
||||
hbc_filter->add_child(focus_current);
|
||||
focus_current->set_text(TTR("Go to Source"));
|
||||
focus_current->connect("pressed", callable_mp(this, &ConnectDialog::_focus_currently_connected));
|
||||
focus_current->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_focus_currently_connected));
|
||||
|
||||
Node *mc = vbc_left->add_margin_child(TTR("Connect to Script:"), hbc_filter, false);
|
||||
connect_to_label = Object::cast_to<Label>(vbc_left->get_child(mc->get_index() - 1));
|
||||
@ -768,13 +768,13 @@ ConnectDialog::ConnectDialog() {
|
||||
method_vbc->add_child(script_methods_only);
|
||||
script_methods_only->set_h_size_flags(Control::SIZE_SHRINK_END);
|
||||
script_methods_only->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "show_script_methods_only", true));
|
||||
script_methods_only->connect("pressed", callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(script_methods_only));
|
||||
script_methods_only->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(script_methods_only));
|
||||
|
||||
compatible_methods_only = memnew(CheckButton(TTR("Compatible Methods Only")));
|
||||
method_vbc->add_child(compatible_methods_only);
|
||||
compatible_methods_only->set_h_size_flags(Control::SIZE_SHRINK_END);
|
||||
compatible_methods_only->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "show_compatible_methods_only", true));
|
||||
compatible_methods_only->connect("pressed", callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(compatible_methods_only));
|
||||
compatible_methods_only->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(compatible_methods_only));
|
||||
|
||||
vbc_right = memnew(VBoxContainer);
|
||||
main_hb->add_child(vbc_right);
|
||||
@ -800,13 +800,13 @@ ConnectDialog::ConnectDialog() {
|
||||
Button *add_bind = memnew(Button);
|
||||
add_bind->set_text(TTR("Add"));
|
||||
add_bind_hb->add_child(add_bind);
|
||||
add_bind->connect("pressed", callable_mp(this, &ConnectDialog::_add_bind));
|
||||
add_bind->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_add_bind));
|
||||
bind_controls.push_back(add_bind);
|
||||
|
||||
Button *del_bind = memnew(Button);
|
||||
del_bind->set_text(TTR("Remove"));
|
||||
add_bind_hb->add_child(del_bind);
|
||||
del_bind->connect("pressed", callable_mp(this, &ConnectDialog::_remove_bind));
|
||||
del_bind->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_remove_bind));
|
||||
bind_controls.push_back(del_bind);
|
||||
|
||||
vbc_right->add_margin_child(TTR("Add Extra Call Argument:"), add_bind_hb);
|
||||
@ -834,13 +834,13 @@ ConnectDialog::ConnectDialog() {
|
||||
open_method_tree = memnew(Button);
|
||||
hbc_method->add_child(open_method_tree);
|
||||
open_method_tree->set_text("Pick");
|
||||
open_method_tree->connect("pressed", callable_mp(this, &ConnectDialog::_open_method_popup));
|
||||
open_method_tree->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_open_method_popup));
|
||||
|
||||
advanced = memnew(CheckButton(TTR("Advanced")));
|
||||
vbc_left->add_child(advanced);
|
||||
advanced->set_h_size_flags(Control::SIZE_SHRINK_BEGIN | Control::SIZE_EXPAND);
|
||||
advanced->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "use_advanced_connections", false));
|
||||
advanced->connect("pressed", callable_mp(this, &ConnectDialog::_advanced_pressed));
|
||||
advanced->connect(SceneStringName(pressed), callable_mp(this, &ConnectDialog::_advanced_pressed));
|
||||
|
||||
HBoxContainer *hbox = memnew(HBoxContainer);
|
||||
vbc_right->add_child(hbox);
|
||||
@ -1583,7 +1583,7 @@ ConnectionsDock::ConnectionsDock() {
|
||||
vbc->add_child(hb);
|
||||
hb->add_spacer();
|
||||
hb->add_child(connect_button);
|
||||
connect_button->connect("pressed", callable_mp(this, &ConnectionsDock::_connect_pressed));
|
||||
connect_button->connect(SceneStringName(pressed), callable_mp(this, &ConnectionsDock::_connect_pressed));
|
||||
|
||||
connect_dialog = memnew(ConnectDialog);
|
||||
connect_dialog->connect("connected", callable_mp(NodeDock::get_singleton(), &NodeDock::restore_last_valid_node), CONNECT_DEFERRED);
|
||||
|
@ -815,7 +815,7 @@ CreateDialog::CreateDialog() {
|
||||
favorite = memnew(Button);
|
||||
favorite->set_toggle_mode(true);
|
||||
favorite->set_tooltip_text(TTR("(Un)favorite selected item."));
|
||||
favorite->connect("pressed", callable_mp(this, &CreateDialog::_favorite_toggled));
|
||||
favorite->connect(SceneStringName(pressed), callable_mp(this, &CreateDialog::_favorite_toggled));
|
||||
search_hb->add_child(favorite);
|
||||
vbc->add_margin_child(TTR("Search:"), search_hb);
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ DebugAdapterProtocol::DebugAdapterProtocol() {
|
||||
|
||||
reset_ids();
|
||||
|
||||
EditorRunBar::get_singleton()->get_pause_button()->connect("pressed", callable_mp(this, &DebugAdapterProtocol::on_debug_paused));
|
||||
EditorRunBar::get_singleton()->get_pause_button()->connect(SceneStringName(pressed), callable_mp(this, &DebugAdapterProtocol::on_debug_paused));
|
||||
|
||||
EditorDebuggerNode *debugger_node = EditorDebuggerNode::get_singleton();
|
||||
debugger_node->connect("breakpoint_toggled", callable_mp(this, &DebugAdapterProtocol::on_debug_breakpoint_toggled));
|
||||
|
@ -91,7 +91,7 @@ EditorDebuggerNode::EditorDebuggerNode() {
|
||||
remote_scene_tree_timeout = EDITOR_GET("debugger/remote_scene_tree_refresh_interval");
|
||||
inspect_edited_object_timeout = EDITOR_GET("debugger/remote_inspect_refresh_interval");
|
||||
|
||||
EditorRunBar::get_singleton()->get_pause_button()->connect("pressed", callable_mp(this, &EditorDebuggerNode::_paused));
|
||||
EditorRunBar::get_singleton()->get_pause_button()->connect(SceneStringName(pressed), callable_mp(this, &EditorDebuggerNode::_paused));
|
||||
}
|
||||
|
||||
ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
|
||||
|
@ -614,12 +614,12 @@ EditorProfiler::EditorProfiler() {
|
||||
activate->set_toggle_mode(true);
|
||||
activate->set_disabled(true);
|
||||
activate->set_text(TTR("Start"));
|
||||
activate->connect("pressed", callable_mp(this, &EditorProfiler::_activate_pressed));
|
||||
activate->connect(SceneStringName(pressed), callable_mp(this, &EditorProfiler::_activate_pressed));
|
||||
hb->add_child(activate);
|
||||
|
||||
clear_button = memnew(Button);
|
||||
clear_button->set_text(TTR("Clear"));
|
||||
clear_button->connect("pressed", callable_mp(this, &EditorProfiler::_clear_pressed));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorProfiler::_clear_pressed));
|
||||
clear_button->set_disabled(true);
|
||||
hb->add_child(clear_button);
|
||||
|
||||
@ -649,7 +649,7 @@ EditorProfiler::EditorProfiler() {
|
||||
display_internal_profiles = memnew(CheckButton(TTR("Display internal functions")));
|
||||
display_internal_profiles->set_visible(EDITOR_GET("debugger/profile_native_calls"));
|
||||
display_internal_profiles->set_pressed(false);
|
||||
display_internal_profiles->connect("pressed", callable_mp(this, &EditorProfiler::_internal_profiles_pressed));
|
||||
display_internal_profiles->connect(SceneStringName(pressed), callable_mp(this, &EditorProfiler::_internal_profiles_pressed));
|
||||
hb->add_child(display_internal_profiles);
|
||||
|
||||
hb->add_spacer();
|
||||
|
@ -736,13 +736,13 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
||||
activate->set_toggle_mode(true);
|
||||
activate->set_disabled(true);
|
||||
activate->set_text(TTR("Start"));
|
||||
activate->connect("pressed", callable_mp(this, &EditorVisualProfiler::_activate_pressed));
|
||||
activate->connect(SceneStringName(pressed), callable_mp(this, &EditorVisualProfiler::_activate_pressed));
|
||||
hb->add_child(activate);
|
||||
|
||||
clear_button = memnew(Button);
|
||||
clear_button->set_text(TTR("Clear"));
|
||||
clear_button->set_disabled(true);
|
||||
clear_button->connect("pressed", callable_mp(this, &EditorVisualProfiler::_clear_pressed));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorVisualProfiler::_clear_pressed));
|
||||
hb->add_child(clear_button);
|
||||
|
||||
hb->add_child(memnew(Label(TTR("Measure:"))));
|
||||
@ -757,11 +757,11 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
||||
frame_relative = memnew(CheckBox(TTR("Fit to Frame")));
|
||||
frame_relative->set_pressed(true);
|
||||
hb->add_child(frame_relative);
|
||||
frame_relative->connect("pressed", callable_mp(this, &EditorVisualProfiler::_update_plot));
|
||||
frame_relative->connect(SceneStringName(pressed), callable_mp(this, &EditorVisualProfiler::_update_plot));
|
||||
linked = memnew(CheckBox(TTR("Linked")));
|
||||
linked->set_pressed(true);
|
||||
hb->add_child(linked);
|
||||
linked->connect("pressed", callable_mp(this, &EditorVisualProfiler::_update_plot));
|
||||
linked->connect(SceneStringName(pressed), callable_mp(this, &EditorVisualProfiler::_update_plot));
|
||||
|
||||
hb->add_spacer();
|
||||
|
||||
|
@ -849,8 +849,8 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
|
||||
void ScriptEditorDebugger::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
le_set->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
|
||||
le_clear->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
|
||||
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("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
|
||||
breakpoints_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_breakpoint_tree_clicked));
|
||||
@ -1826,7 +1826,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
skip_breakpoints->set_theme_type_variation("FlatButton");
|
||||
hbc->add_child(skip_breakpoints);
|
||||
skip_breakpoints->set_tooltip_text(TTR("Skip Breakpoints"));
|
||||
skip_breakpoints->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_skip_breakpoints));
|
||||
skip_breakpoints->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_skip_breakpoints));
|
||||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
@ -1834,7 +1834,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
copy->set_theme_type_variation("FlatButton");
|
||||
hbc->add_child(copy);
|
||||
copy->set_tooltip_text(TTR("Copy Error"));
|
||||
copy->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_copy));
|
||||
copy->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_copy));
|
||||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
@ -1843,14 +1843,14 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(step);
|
||||
step->set_tooltip_text(TTR("Step Into"));
|
||||
step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into"));
|
||||
step->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_step));
|
||||
step->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_step));
|
||||
|
||||
next = memnew(Button);
|
||||
next->set_theme_type_variation("FlatButton");
|
||||
hbc->add_child(next);
|
||||
next->set_tooltip_text(TTR("Step Over"));
|
||||
next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over"));
|
||||
next->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_next));
|
||||
next->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_next));
|
||||
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
@ -1859,14 +1859,14 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(dobreak);
|
||||
dobreak->set_tooltip_text(TTR("Break"));
|
||||
dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break"));
|
||||
dobreak->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_break));
|
||||
dobreak->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_break));
|
||||
|
||||
docontinue = memnew(Button);
|
||||
docontinue->set_theme_type_variation("FlatButton");
|
||||
hbc->add_child(docontinue);
|
||||
docontinue->set_tooltip_text(TTR("Continue"));
|
||||
docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue"));
|
||||
docontinue->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_continue));
|
||||
docontinue->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_continue));
|
||||
|
||||
HSplitContainer *parent_sc = memnew(HSplitContainer);
|
||||
vbc->add_child(parent_sc);
|
||||
@ -1952,13 +1952,13 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
expand_all_button = memnew(Button);
|
||||
expand_all_button->set_text(TTR("Expand All"));
|
||||
expand_all_button->set_disabled(true);
|
||||
expand_all_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_expand_errors_list));
|
||||
expand_all_button->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_expand_errors_list));
|
||||
error_hbox->add_child(expand_all_button);
|
||||
|
||||
collapse_all_button = memnew(Button);
|
||||
collapse_all_button->set_text(TTR("Collapse All"));
|
||||
collapse_all_button->set_disabled(true);
|
||||
collapse_all_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_collapse_errors_list));
|
||||
collapse_all_button->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_collapse_errors_list));
|
||||
error_hbox->add_child(collapse_all_button);
|
||||
|
||||
Control *space = memnew(Control);
|
||||
@ -1969,7 +1969,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
clear_button->set_text(TTR("Clear"));
|
||||
clear_button->set_h_size_flags(0);
|
||||
clear_button->set_disabled(true);
|
||||
clear_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_clear_errors_list));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_clear_errors_list));
|
||||
error_hbox->add_child(clear_button);
|
||||
|
||||
error_tree = memnew(Tree);
|
||||
@ -2044,8 +2044,8 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
vmem_export->set_tooltip_text(TTR("Export list to a CSV file"));
|
||||
vmem_hb->add_child(vmem_export);
|
||||
vmem_vb->add_child(vmem_hb);
|
||||
vmem_refresh->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_video_mem_request));
|
||||
vmem_export->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_video_mem_export));
|
||||
vmem_refresh->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_video_mem_request));
|
||||
vmem_export->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_video_mem_export));
|
||||
|
||||
VBoxContainer *vmmc = memnew(VBoxContainer);
|
||||
vmem_tree = memnew(Tree);
|
||||
@ -2114,7 +2114,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
HBoxContainer *buttons = memnew(HBoxContainer);
|
||||
|
||||
export_csv = memnew(Button(TTR("Export measures as CSV")));
|
||||
export_csv->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_export_csv));
|
||||
export_csv->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_export_csv));
|
||||
buttons->add_child(export_csv);
|
||||
|
||||
misc->add_child(buttons);
|
||||
|
@ -266,7 +266,7 @@ DependencyEditor::DependencyEditor() {
|
||||
hbc->add_spacer();
|
||||
fixdeps = memnew(Button(TTR("Fix Broken")));
|
||||
hbc->add_child(fixdeps);
|
||||
fixdeps->connect("pressed", callable_mp(this, &DependencyEditor::_fix_all));
|
||||
fixdeps->connect(SceneStringName(pressed), callable_mp(this, &DependencyEditor::_fix_all));
|
||||
|
||||
vb->add_child(hbc);
|
||||
|
||||
|
@ -215,7 +215,7 @@ EditorAbout::EditorAbout() {
|
||||
}
|
||||
version_btn->set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version number."), build_date));
|
||||
|
||||
version_btn->connect("pressed", callable_mp(this, &EditorAbout::_version_button_pressed));
|
||||
version_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorAbout::_version_button_pressed));
|
||||
version_info_vbc->add_child(version_btn);
|
||||
|
||||
Label *about_text = memnew(Label);
|
||||
|
@ -694,7 +694,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
|
||||
target_dir_button->set_text(TTR("Change Install Folder"));
|
||||
target_dir_button->set_tooltip_text(TTR("Change the folder where the contents of the asset are going to be installed."));
|
||||
remapping_tools->add_child(target_dir_button);
|
||||
target_dir_button->connect("pressed", callable_mp(this, &EditorAssetInstaller::_open_target_dir_dialog));
|
||||
target_dir_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetInstaller::_open_target_dir_dialog));
|
||||
|
||||
remapping_tools->add_child(memnew(VSeparator));
|
||||
|
||||
@ -716,7 +716,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
|
||||
asset_conflicts_link->set_tooltip_text(TTR("Show contents of the asset and conflicting files."));
|
||||
asset_conflicts_link->set_visible(false);
|
||||
remapping_tools->add_child(asset_conflicts_link);
|
||||
asset_conflicts_link->connect("pressed", callable_mp(this, &EditorAssetInstaller::_toggle_source_tree).bind(true, true));
|
||||
asset_conflicts_link->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetInstaller::_toggle_source_tree).bind(true, true));
|
||||
|
||||
// File hierarchy trees.
|
||||
|
||||
|
@ -92,9 +92,9 @@ void EditorAudioBus::_notification(int p_what) {
|
||||
Color bypass_color = EditorThemeManager::is_dark_theme() ? Color(0.13, 0.8, 1.0) : Color(1.03, 2.04, 2.35);
|
||||
float darkening_factor = EditorThemeManager::is_dark_theme() ? 0.15 : 0.65;
|
||||
|
||||
Ref<StyleBoxFlat>(solo->get_theme_stylebox("pressed"))->set_border_color(solo_color.darkened(darkening_factor));
|
||||
Ref<StyleBoxFlat>(mute->get_theme_stylebox("pressed"))->set_border_color(mute_color.darkened(darkening_factor));
|
||||
Ref<StyleBoxFlat>(bypass->get_theme_stylebox("pressed"))->set_border_color(bypass_color.darkened(darkening_factor));
|
||||
Ref<StyleBoxFlat>(solo->get_theme_stylebox(SceneStringName(pressed)))->set_border_color(solo_color.darkened(darkening_factor));
|
||||
Ref<StyleBoxFlat>(mute->get_theme_stylebox(SceneStringName(pressed)))->set_border_color(mute_color.darkened(darkening_factor));
|
||||
Ref<StyleBoxFlat>(bypass->get_theme_stylebox(SceneStringName(pressed)))->set_border_color(bypass_color.darkened(darkening_factor));
|
||||
|
||||
solo->set_icon(get_editor_theme_icon(SNAME("AudioBusSolo")));
|
||||
solo->add_theme_color_override("icon_pressed_color", solo_color);
|
||||
@ -815,21 +815,21 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
||||
solo->set_toggle_mode(true);
|
||||
solo->set_tooltip_text(TTR("Solo"));
|
||||
solo->set_focus_mode(FOCUS_NONE);
|
||||
solo->connect("pressed", callable_mp(this, &EditorAudioBus::_solo_toggled));
|
||||
solo->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBus::_solo_toggled));
|
||||
hbc->add_child(solo);
|
||||
mute = memnew(Button);
|
||||
mute->set_theme_type_variation("FlatButton");
|
||||
mute->set_toggle_mode(true);
|
||||
mute->set_tooltip_text(TTR("Mute"));
|
||||
mute->set_focus_mode(FOCUS_NONE);
|
||||
mute->connect("pressed", callable_mp(this, &EditorAudioBus::_mute_toggled));
|
||||
mute->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBus::_mute_toggled));
|
||||
hbc->add_child(mute);
|
||||
bypass = memnew(Button);
|
||||
bypass->set_theme_type_variation("FlatButton");
|
||||
bypass->set_toggle_mode(true);
|
||||
bypass->set_tooltip_text(TTR("Bypass"));
|
||||
bypass->set_focus_mode(FOCUS_NONE);
|
||||
bypass->connect("pressed", callable_mp(this, &EditorAudioBus::_bypass_toggled));
|
||||
bypass->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBus::_bypass_toggled));
|
||||
hbc->add_child(bypass);
|
||||
hbc->add_spacer();
|
||||
|
||||
@ -845,7 +845,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
||||
sbflat->set_content_margin_all(0);
|
||||
sbflat->set_bg_color(Color(1, 1, 1, 0));
|
||||
sbflat->set_border_width(Side::SIDE_BOTTOM, Math::round(3 * EDSCALE));
|
||||
child->add_theme_style_override("pressed", sbflat);
|
||||
child->add_theme_style_override(SceneStringName(pressed), sbflat);
|
||||
|
||||
child->end_bulk_theme_override();
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ EditorAudioBuses::EditorAudioBuses() {
|
||||
top_hb->add_child(add);
|
||||
add->set_text(TTR("Add Bus"));
|
||||
add->set_tooltip_text(TTR("Add a new Audio Bus to this layout."));
|
||||
add->connect("pressed", callable_mp(this, &EditorAudioBuses::_add_bus));
|
||||
add->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBuses::_add_bus));
|
||||
|
||||
VSeparator *separator = memnew(VSeparator);
|
||||
top_hb->add_child(separator);
|
||||
@ -1322,25 +1322,25 @@ EditorAudioBuses::EditorAudioBuses() {
|
||||
load->set_text(TTR("Load"));
|
||||
load->set_tooltip_text(TTR("Load an existing Bus Layout."));
|
||||
top_hb->add_child(load);
|
||||
load->connect("pressed", callable_mp(this, &EditorAudioBuses::_load_layout));
|
||||
load->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBuses::_load_layout));
|
||||
|
||||
save_as = memnew(Button);
|
||||
save_as->set_text(TTR("Save As"));
|
||||
save_as->set_tooltip_text(TTR("Save this Bus Layout to a file."));
|
||||
top_hb->add_child(save_as);
|
||||
save_as->connect("pressed", callable_mp(this, &EditorAudioBuses::_save_as_layout));
|
||||
save_as->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBuses::_save_as_layout));
|
||||
|
||||
_default = memnew(Button);
|
||||
_default->set_text(TTR("Load Default"));
|
||||
_default->set_tooltip_text(TTR("Load the default Bus Layout."));
|
||||
top_hb->add_child(_default);
|
||||
_default->connect("pressed", callable_mp(this, &EditorAudioBuses::_load_default_layout));
|
||||
_default->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBuses::_load_default_layout));
|
||||
|
||||
_new = memnew(Button);
|
||||
_new->set_text(TTR("Create"));
|
||||
_new->set_tooltip_text(TTR("Create a new Bus Layout."));
|
||||
top_hb->add_child(_new);
|
||||
_new->connect("pressed", callable_mp(this, &EditorAudioBuses::_new_layout));
|
||||
_new->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBuses::_new_layout));
|
||||
|
||||
bus_scroll = memnew(ScrollContainer);
|
||||
bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
@ -900,7 +900,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
|
||||
|
||||
browse_button = memnew(Button);
|
||||
hbc->add_child(browse_button);
|
||||
browse_button->connect("pressed", callable_mp(this, &EditorAutoloadSettings::_browse_autoload_add_path));
|
||||
browse_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAutoloadSettings::_browse_autoload_add_path));
|
||||
|
||||
file_dialog = memnew(EditorFileDialog);
|
||||
hbc->add_child(file_dialog);
|
||||
@ -924,7 +924,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
|
||||
|
||||
add_autoload = memnew(Button);
|
||||
add_autoload->set_text(TTR("Add"));
|
||||
add_autoload->connect("pressed", callable_mp(this, &EditorAutoloadSettings::_autoload_add));
|
||||
add_autoload->connect(SceneStringName(pressed), callable_mp(this, &EditorAutoloadSettings::_autoload_add));
|
||||
// The button will be enabled once a valid name is entered (either automatically or manually).
|
||||
add_autoload->set_disabled(true);
|
||||
hbc->add_child(add_autoload);
|
||||
|
@ -816,19 +816,19 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
|
||||
|
||||
profile_actions[ACTION_NEW] = memnew(Button(TTR("New")));
|
||||
path_hbc->add_child(profile_actions[ACTION_NEW]);
|
||||
profile_actions[ACTION_NEW]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_NEW));
|
||||
profile_actions[ACTION_NEW]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_NEW));
|
||||
|
||||
profile_actions[ACTION_LOAD] = memnew(Button(TTR("Load")));
|
||||
path_hbc->add_child(profile_actions[ACTION_LOAD]);
|
||||
profile_actions[ACTION_LOAD]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_LOAD));
|
||||
profile_actions[ACTION_LOAD]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_LOAD));
|
||||
|
||||
profile_actions[ACTION_SAVE] = memnew(Button(TTR("Save")));
|
||||
path_hbc->add_child(profile_actions[ACTION_SAVE]);
|
||||
profile_actions[ACTION_SAVE]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE));
|
||||
profile_actions[ACTION_SAVE]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE));
|
||||
|
||||
profile_actions[ACTION_SAVE_AS] = memnew(Button(TTR("Save As")));
|
||||
path_hbc->add_child(profile_actions[ACTION_SAVE_AS]);
|
||||
profile_actions[ACTION_SAVE_AS]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE_AS));
|
||||
profile_actions[ACTION_SAVE_AS]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE_AS));
|
||||
|
||||
main_vbc->add_margin_child(TTR("Profile:"), path_hbc);
|
||||
|
||||
@ -838,11 +838,11 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
|
||||
|
||||
profile_actions[ACTION_RESET] = memnew(Button(TTR("Reset to Defaults")));
|
||||
profiles_hbc->add_child(profile_actions[ACTION_RESET]);
|
||||
profile_actions[ACTION_RESET]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_RESET));
|
||||
profile_actions[ACTION_RESET]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_RESET));
|
||||
|
||||
profile_actions[ACTION_DETECT] = memnew(Button(TTR("Detect from Project")));
|
||||
profiles_hbc->add_child(profile_actions[ACTION_DETECT]);
|
||||
profile_actions[ACTION_DETECT]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_DETECT));
|
||||
profile_actions[ACTION_DETECT]->connect(SceneStringName(pressed), callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_DETECT));
|
||||
|
||||
main_vbc->add_margin_child(TTR("Actions:"), profiles_hbc);
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ DockContextPopup::DockContextPopup() {
|
||||
tab_move_left_button = memnew(Button);
|
||||
tab_move_left_button->set_flat(true);
|
||||
tab_move_left_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
tab_move_left_button->connect("pressed", callable_mp(this, &DockContextPopup::_tab_move_left));
|
||||
tab_move_left_button->connect(SceneStringName(pressed), callable_mp(this, &DockContextPopup::_tab_move_left));
|
||||
header_hb->add_child(tab_move_left_button);
|
||||
|
||||
Label *position_label = memnew(Label);
|
||||
@ -1085,7 +1085,7 @@ DockContextPopup::DockContextPopup() {
|
||||
tab_move_right_button = memnew(Button);
|
||||
tab_move_right_button->set_flat(true);
|
||||
tab_move_right_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
tab_move_right_button->connect("pressed", callable_mp(this, &DockContextPopup::_tab_move_right));
|
||||
tab_move_right_button->connect(SceneStringName(pressed), callable_mp(this, &DockContextPopup::_tab_move_right));
|
||||
|
||||
header_hb->add_child(tab_move_right_button);
|
||||
dock_select_popup_vb->add_child(header_hb);
|
||||
@ -1108,7 +1108,7 @@ DockContextPopup::DockContextPopup() {
|
||||
}
|
||||
make_float_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
make_float_button->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
make_float_button->connect("pressed", callable_mp(this, &DockContextPopup::_float_dock));
|
||||
make_float_button->connect(SceneStringName(pressed), callable_mp(this, &DockContextPopup::_float_dock));
|
||||
dock_select_popup_vb->add_child(make_float_button);
|
||||
|
||||
dock_to_bottom_button = memnew(Button);
|
||||
@ -1116,7 +1116,7 @@ DockContextPopup::DockContextPopup() {
|
||||
dock_to_bottom_button->set_tooltip_text(TTR("Move this dock to the bottom panel."));
|
||||
dock_to_bottom_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
dock_to_bottom_button->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
dock_to_bottom_button->connect("pressed", callable_mp(this, &DockContextPopup::_move_dock_to_bottom));
|
||||
dock_to_bottom_button->connect(SceneStringName(pressed), callable_mp(this, &DockContextPopup::_move_dock_to_bottom));
|
||||
dock_to_bottom_button->hide();
|
||||
dock_select_popup_vb->add_child(dock_to_bottom_button);
|
||||
|
||||
@ -1125,6 +1125,6 @@ DockContextPopup::DockContextPopup() {
|
||||
close_button->set_tooltip_text(TTR("Close this dock."));
|
||||
close_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
close_button->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
close_button->connect("pressed", callable_mp(this, &DockContextPopup::_close_dock));
|
||||
close_button->connect(SceneStringName(pressed), callable_mp(this, &DockContextPopup::_close_dock));
|
||||
dock_select_popup_vb->add_child(close_button);
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
|
||||
profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Reset to Default")));
|
||||
name_hbc->add_child(profile_actions[PROFILE_CLEAR]);
|
||||
profile_actions[PROFILE_CLEAR]->set_disabled(true);
|
||||
profile_actions[PROFILE_CLEAR]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_CLEAR));
|
||||
profile_actions[PROFILE_CLEAR]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_CLEAR));
|
||||
|
||||
main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc);
|
||||
|
||||
@ -930,12 +930,12 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
|
||||
|
||||
profile_actions[PROFILE_NEW] = memnew(Button(TTR("Create Profile")));
|
||||
profiles_hbc->add_child(profile_actions[PROFILE_NEW]);
|
||||
profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_NEW));
|
||||
profile_actions[PROFILE_NEW]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_NEW));
|
||||
|
||||
profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove Profile")));
|
||||
profiles_hbc->add_child(profile_actions[PROFILE_ERASE]);
|
||||
profile_actions[PROFILE_ERASE]->set_disabled(true);
|
||||
profile_actions[PROFILE_ERASE]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_ERASE));
|
||||
profile_actions[PROFILE_ERASE]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_ERASE));
|
||||
|
||||
main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc);
|
||||
|
||||
@ -944,18 +944,18 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
|
||||
profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current")));
|
||||
current_profile_hbc->add_child(profile_actions[PROFILE_SET]);
|
||||
profile_actions[PROFILE_SET]->set_disabled(true);
|
||||
profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_SET));
|
||||
profile_actions[PROFILE_SET]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_SET));
|
||||
|
||||
current_profile_hbc->add_child(memnew(VSeparator));
|
||||
|
||||
profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import")));
|
||||
current_profile_hbc->add_child(profile_actions[PROFILE_IMPORT]);
|
||||
profile_actions[PROFILE_IMPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_IMPORT));
|
||||
profile_actions[PROFILE_IMPORT]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_IMPORT));
|
||||
|
||||
profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export")));
|
||||
current_profile_hbc->add_child(profile_actions[PROFILE_EXPORT]);
|
||||
profile_actions[PROFILE_EXPORT]->set_disabled(true);
|
||||
profile_actions[PROFILE_EXPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_EXPORT));
|
||||
profile_actions[PROFILE_EXPORT]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_EXPORT));
|
||||
|
||||
main_vbc->add_child(current_profile_hbc);
|
||||
|
||||
|
@ -3117,7 +3117,7 @@ EditorHelp::EditorHelp() {
|
||||
|
||||
toggle_scripts_button = memnew(Button);
|
||||
toggle_scripts_button->set_flat(true);
|
||||
toggle_scripts_button->connect("pressed", callable_mp(this, &EditorHelp::_toggle_scripts_pressed));
|
||||
toggle_scripts_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelp::_toggle_scripts_pressed));
|
||||
status_bar->add_child(toggle_scripts_button);
|
||||
|
||||
class_desc->set_selection_enabled(true);
|
||||
@ -4043,13 +4043,13 @@ FindBar::FindBar() {
|
||||
find_prev->set_flat(true);
|
||||
add_child(find_prev);
|
||||
find_prev->set_focus_mode(FOCUS_NONE);
|
||||
find_prev->connect("pressed", callable_mp(this, &FindBar::search_prev));
|
||||
find_prev->connect(SceneStringName(pressed), callable_mp(this, &FindBar::search_prev));
|
||||
|
||||
find_next = memnew(Button);
|
||||
find_next->set_flat(true);
|
||||
add_child(find_next);
|
||||
find_next->set_focus_mode(FOCUS_NONE);
|
||||
find_next->connect("pressed", callable_mp(this, &FindBar::search_next));
|
||||
find_next->connect(SceneStringName(pressed), callable_mp(this, &FindBar::search_next));
|
||||
|
||||
Control *space = memnew(Control);
|
||||
add_child(space);
|
||||
@ -4060,7 +4060,7 @@ FindBar::FindBar() {
|
||||
hide_button->set_focus_mode(FOCUS_NONE);
|
||||
hide_button->set_ignore_texture_size(true);
|
||||
hide_button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
|
||||
hide_button->connect("pressed", callable_mp(this, &FindBar::_hide_bar));
|
||||
hide_button->connect(SceneStringName(pressed), callable_mp(this, &FindBar::_hide_bar));
|
||||
}
|
||||
|
||||
void FindBar::popup_search() {
|
||||
|
@ -323,7 +323,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
||||
case_sensitive_button = memnew(Button);
|
||||
case_sensitive_button->set_theme_type_variation("FlatButton");
|
||||
case_sensitive_button->set_tooltip_text(TTR("Case Sensitive"));
|
||||
case_sensitive_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
case_sensitive_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
case_sensitive_button->set_toggle_mode(true);
|
||||
case_sensitive_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
hbox->add_child(case_sensitive_button);
|
||||
@ -331,7 +331,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
||||
hierarchy_button = memnew(Button);
|
||||
hierarchy_button->set_theme_type_variation("FlatButton");
|
||||
hierarchy_button->set_tooltip_text(TTR("Show Hierarchy"));
|
||||
hierarchy_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
hierarchy_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
hierarchy_button->set_toggle_mode(true);
|
||||
hierarchy_button->set_pressed(true);
|
||||
hierarchy_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
|
@ -2203,7 +2203,7 @@ void EditorInspectorArray::_setup() {
|
||||
if (element_position > 0) {
|
||||
ae.move_up = memnew(Button);
|
||||
ae.move_up->set_icon(get_editor_theme_icon(SNAME("MoveUp")));
|
||||
ae.move_up->connect("pressed", callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position - 1));
|
||||
ae.move_up->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position - 1));
|
||||
move_vbox->add_child(ae.move_up);
|
||||
}
|
||||
|
||||
@ -2219,7 +2219,7 @@ void EditorInspectorArray::_setup() {
|
||||
if (element_position < _get_array_count() - 1) {
|
||||
ae.move_down = memnew(Button);
|
||||
ae.move_down->set_icon(get_editor_theme_icon(SNAME("MoveDown")));
|
||||
ae.move_down->connect("pressed", callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position + 2));
|
||||
ae.move_down->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position + 2));
|
||||
move_vbox->add_child(ae.move_down);
|
||||
}
|
||||
}
|
||||
@ -2243,7 +2243,7 @@ void EditorInspectorArray::_setup() {
|
||||
ae.erase = memnew(Button);
|
||||
ae.erase->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
ae.erase->set_v_size_flags(SIZE_SHRINK_CENTER);
|
||||
ae.erase->connect("pressed", callable_mp(this, &EditorInspectorArray::_remove_item).bind(element_position));
|
||||
ae.erase->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_remove_item).bind(element_position));
|
||||
ae.hbox->add_child(ae.erase);
|
||||
}
|
||||
|
||||
@ -2433,7 +2433,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
|
||||
vbox->add_child(elements_vbox);
|
||||
|
||||
add_button = EditorInspector::create_inspector_action_button(TTR("Add Element"));
|
||||
add_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_add_button_pressed));
|
||||
add_button->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_add_button_pressed));
|
||||
add_button->set_disabled(read_only);
|
||||
vbox->add_child(add_button);
|
||||
|
||||
@ -2528,12 +2528,12 @@ EditorPaginator::EditorPaginator() {
|
||||
|
||||
first_page_button = memnew(Button);
|
||||
first_page_button->set_flat(true);
|
||||
first_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_first_page_button_pressed));
|
||||
first_page_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPaginator::_first_page_button_pressed));
|
||||
add_child(first_page_button);
|
||||
|
||||
prev_page_button = memnew(Button);
|
||||
prev_page_button->set_flat(true);
|
||||
prev_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_prev_page_button_pressed));
|
||||
prev_page_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPaginator::_prev_page_button_pressed));
|
||||
add_child(prev_page_button);
|
||||
|
||||
page_line_edit = memnew(LineEdit);
|
||||
@ -2546,12 +2546,12 @@ EditorPaginator::EditorPaginator() {
|
||||
|
||||
next_page_button = memnew(Button);
|
||||
next_page_button->set_flat(true);
|
||||
next_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_next_page_button_pressed));
|
||||
next_page_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPaginator::_next_page_button_pressed));
|
||||
add_child(next_page_button);
|
||||
|
||||
last_page_button = memnew(Button);
|
||||
last_page_button->set_flat(true);
|
||||
last_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_last_page_button_pressed));
|
||||
last_page_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPaginator::_last_page_button_pressed));
|
||||
add_child(last_page_button);
|
||||
}
|
||||
|
||||
@ -3465,7 +3465,7 @@ void EditorInspector::update_tree() {
|
||||
|
||||
Button *add_md = EditorInspector::create_inspector_action_button(TTR("Add Metadata"));
|
||||
add_md->set_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
add_md->connect(SNAME("pressed"), callable_mp(this, &EditorInspector::_show_add_meta_dialog));
|
||||
add_md->connect(SceneStringName(pressed), callable_mp(this, &EditorInspector::_show_add_meta_dialog));
|
||||
main_vbox->add_child(add_md);
|
||||
if (all_read_only) {
|
||||
add_md->set_disabled(true);
|
||||
|
@ -483,7 +483,7 @@ EditorLog::EditorLog() {
|
||||
clear_button->set_theme_type_variation("FlatButton");
|
||||
clear_button->set_focus_mode(FOCUS_NONE);
|
||||
clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::K));
|
||||
clear_button->connect("pressed", callable_mp(this, &EditorLog::_clear_request));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorLog::_clear_request));
|
||||
hb_tools->add_child(clear_button);
|
||||
|
||||
// Copy.
|
||||
@ -492,7 +492,7 @@ EditorLog::EditorLog() {
|
||||
copy_button->set_focus_mode(FOCUS_NONE);
|
||||
copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KeyModifierMask::CMD_OR_CTRL | Key::C));
|
||||
copy_button->set_shortcut_context(this);
|
||||
copy_button->connect("pressed", callable_mp(this, &EditorLog::_copy_request));
|
||||
copy_button->connect(SceneStringName(pressed), callable_mp(this, &EditorLog::_copy_request));
|
||||
hb_tools->add_child(copy_button);
|
||||
|
||||
// Separate toggle buttons from normal buttons.
|
||||
|
@ -521,7 +521,7 @@ void EditorNode::_update_theme(bool p_skip_creation) {
|
||||
scene_root_parent->add_theme_style_override("panel", theme->get_stylebox(SNAME("Content"), EditorStringName(EditorStyles)));
|
||||
bottom_panel->add_theme_style_override("panel", theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)));
|
||||
distraction_free->set_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
|
||||
distraction_free->add_theme_style_override("pressed", theme->get_stylebox("normal", "FlatMenuButton"));
|
||||
distraction_free->add_theme_style_override(SceneStringName(pressed), theme->get_stylebox("normal", "FlatMenuButton"));
|
||||
|
||||
help_menu->set_item_icon(help_menu->get_item_index(HELP_SEARCH), theme->get_icon(SNAME("HelpSearch"), EditorStringName(EditorIcons)));
|
||||
help_menu->set_item_icon(help_menu->get_item_index(HELP_COPY_SYSTEM_INFO), theme->get_icon(SNAME("ActionCopy"), EditorStringName(EditorIcons)));
|
||||
@ -3468,7 +3468,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
|
||||
icon->connect_changed(callable_mp((Control *)tb, &Control::update_minimum_size));
|
||||
}
|
||||
|
||||
tb->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
|
||||
tb->connect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
|
||||
|
||||
singleton->main_editor_buttons.push_back(tb);
|
||||
singleton->main_editor_button_hb->add_child(tb);
|
||||
@ -3498,8 +3498,8 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
|
||||
|
||||
break;
|
||||
} else {
|
||||
singleton->main_editor_buttons[i]->disconnect("pressed", callable_mp(singleton, &EditorNode::editor_select));
|
||||
singleton->main_editor_buttons[i]->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(i - 1));
|
||||
singleton->main_editor_buttons[i]->disconnect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select));
|
||||
singleton->main_editor_buttons[i]->connect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select).bind(i - 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -6652,7 +6652,7 @@ EditorNode::EditorNode() {
|
||||
distraction_free->set_tooltip_text(TTR("Toggle distraction-free mode."));
|
||||
distraction_free->set_toggle_mode(true);
|
||||
scene_tabs->add_extra_button(distraction_free);
|
||||
distraction_free->connect("pressed", callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
|
||||
distraction_free->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
|
||||
|
||||
scene_root_parent = memnew(PanelContainer);
|
||||
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
|
||||
@ -7135,7 +7135,7 @@ EditorNode::EditorNode() {
|
||||
gradle_build_manage_templates = memnew(ConfirmationDialog);
|
||||
gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
|
||||
gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
|
||||
gradle_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
|
||||
gradle_build_manage_templates->add_button(TTR("Install from file"))->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
|
||||
gradle_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
|
||||
gui_base->add_child(gradle_build_manage_templates);
|
||||
|
||||
|
@ -235,7 +235,7 @@ EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) {
|
||||
text->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
open_big_text = memnew(Button);
|
||||
open_big_text->set_flat(true);
|
||||
open_big_text->connect("pressed", callable_mp(this, &EditorPropertyMultilineText::_open_big_text));
|
||||
open_big_text->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyMultilineText::_open_big_text));
|
||||
hb->add_child(open_big_text);
|
||||
big_text_dialog = nullptr;
|
||||
big_text = nullptr;
|
||||
@ -382,7 +382,7 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
|
||||
edit_button->set_flat(true);
|
||||
edit_button->hide();
|
||||
default_layout->add_child(edit_button);
|
||||
edit_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_edit_custom_value));
|
||||
edit_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyTextEnum::_edit_custom_value));
|
||||
|
||||
custom_value_edit = memnew(LineEdit);
|
||||
custom_value_edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
@ -392,12 +392,12 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
|
||||
accept_button = memnew(Button);
|
||||
accept_button->set_flat(true);
|
||||
edit_custom_layout->add_child(accept_button);
|
||||
accept_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_accepted));
|
||||
accept_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyTextEnum::_custom_value_accepted));
|
||||
|
||||
cancel_button = memnew(Button);
|
||||
cancel_button->set_flat(true);
|
||||
edit_custom_layout->add_child(cancel_button);
|
||||
cancel_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_canceled));
|
||||
cancel_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyTextEnum::_custom_value_canceled));
|
||||
|
||||
add_focusable(option_button);
|
||||
add_focusable(edit_button);
|
||||
@ -464,7 +464,7 @@ EditorPropertyLocale::EditorPropertyLocale() {
|
||||
locale_hb->add_child(locale_edit);
|
||||
add_focusable(locale);
|
||||
dialog = nullptr;
|
||||
locale_edit->connect("pressed", callable_mp(this, &EditorPropertyLocale::_locale_pressed));
|
||||
locale_edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocale::_locale_pressed));
|
||||
}
|
||||
|
||||
///////////////////// PATH /////////////////////////
|
||||
@ -605,7 +605,7 @@ EditorPropertyPath::EditorPropertyPath() {
|
||||
path_hb->add_child(path_edit);
|
||||
add_focusable(path);
|
||||
dialog = nullptr;
|
||||
path_edit->connect("pressed", callable_mp(this, &EditorPropertyPath::_path_pressed));
|
||||
path_edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyPath::_path_pressed));
|
||||
}
|
||||
|
||||
///////////////////// CLASS NAME /////////////////////////
|
||||
@ -646,7 +646,7 @@ EditorPropertyClassName::EditorPropertyClassName() {
|
||||
add_child(property);
|
||||
add_focusable(property);
|
||||
property->set_text(selected_type);
|
||||
property->connect("pressed", callable_mp(this, &EditorPropertyClassName::_property_selected));
|
||||
property->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyClassName::_property_selected));
|
||||
dialog = memnew(CreateDialog);
|
||||
dialog->set_base_type(base_type);
|
||||
dialog->connect("create", callable_mp(this, &EditorPropertyClassName::_dialog_created));
|
||||
@ -677,7 +677,7 @@ EditorPropertyCheck::EditorPropertyCheck() {
|
||||
checkbox->set_text(TTR("On"));
|
||||
add_child(checkbox);
|
||||
add_focusable(checkbox);
|
||||
checkbox->connect("pressed", callable_mp(this, &EditorPropertyCheck::_checkbox_pressed));
|
||||
checkbox->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyCheck::_checkbox_pressed));
|
||||
}
|
||||
|
||||
///////////////////// ENUM /////////////////////////
|
||||
@ -791,7 +791,7 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
|
||||
CheckBox *cb = memnew(CheckBox);
|
||||
cb->set_text(text_split[0]);
|
||||
cb->set_clip_text(true);
|
||||
cb->connect("pressed", callable_mp(this, &EditorPropertyFlags::_flag_toggled).bind(flag_index));
|
||||
cb->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFlags::_flag_toggled).bind(flag_index));
|
||||
add_focusable(cb);
|
||||
vbox->add_child(cb);
|
||||
flags.push_back(cb);
|
||||
@ -1296,7 +1296,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
|
||||
button = memnew(TextureButton);
|
||||
button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
|
||||
button->set_toggle_mode(true);
|
||||
button->connect("pressed", callable_mp(this, &EditorPropertyLayers::_button_pressed));
|
||||
button->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLayers::_button_pressed));
|
||||
hb->add_child(button);
|
||||
|
||||
set_bottom_editor(hb);
|
||||
@ -1393,7 +1393,7 @@ EditorPropertyObjectID::EditorPropertyObjectID() {
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
edit->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyObjectID::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyObjectID::_edit_pressed));
|
||||
}
|
||||
|
||||
///////////////////// SIGNAL /////////////////////////
|
||||
@ -1420,7 +1420,7 @@ EditorPropertySignal::EditorPropertySignal() {
|
||||
edit = memnew(Button);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertySignal::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertySignal::_edit_pressed));
|
||||
}
|
||||
|
||||
///////////////////// CALLABLE /////////////////////////
|
||||
@ -2154,7 +2154,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
|
||||
warning = memnew(Button);
|
||||
warning->set_text(TTR("Temporary Euler may be changed implicitly!"));
|
||||
warning->set_clip_text(true);
|
||||
warning->connect("pressed", callable_mp(this, &EditorPropertyQuaternion::_warning_pressed));
|
||||
warning->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyQuaternion::_warning_pressed));
|
||||
warning_dialog = memnew(AcceptDialog);
|
||||
add_child(warning_dialog);
|
||||
warning_dialog->set_text(TTR("Temporary Euler will not be stored in the object with the original value. Instead, it will be stored as Quaternion with irreversible conversion.\nThis is due to the fact that the result of Euler->Quaternion can be determined uniquely, but the result of Quaternion->Euler can be multi-existent."));
|
||||
@ -2182,7 +2182,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
|
||||
edit_button->set_flat(true);
|
||||
edit_button->set_toggle_mode(true);
|
||||
default_layout->add_child(edit_button);
|
||||
edit_button->connect("pressed", callable_mp(this, &EditorPropertyQuaternion::_edit_custom_value));
|
||||
edit_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyQuaternion::_edit_custom_value));
|
||||
|
||||
add_focusable(edit_button);
|
||||
|
||||
@ -2981,7 +2981,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
|
||||
assign->set_clip_text(true);
|
||||
assign->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
assign->set_expand_icon(true);
|
||||
assign->connect("pressed", callable_mp(this, &EditorPropertyNodePath::_node_assign));
|
||||
assign->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyNodePath::_node_assign));
|
||||
SET_DRAG_FORWARDING_CD(assign, EditorPropertyNodePath);
|
||||
hbc->add_child(assign);
|
||||
|
||||
|
@ -287,13 +287,13 @@ void EditorPropertyArray::_create_new_property_slot() {
|
||||
Button *edit_btn = memnew(Button);
|
||||
edit_btn->set_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
edit_btn->set_disabled(is_read_only());
|
||||
edit_btn->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type).bind(edit_btn, idx));
|
||||
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_change_type).bind(edit_btn, idx));
|
||||
hbox->add_child(edit_btn);
|
||||
} else {
|
||||
Button *remove_btn = memnew(Button);
|
||||
remove_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
remove_btn->set_disabled(is_read_only());
|
||||
remove_btn->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(idx));
|
||||
remove_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(idx));
|
||||
hbox->add_child(remove_btn);
|
||||
}
|
||||
property_vbox->add_child(hbox);
|
||||
@ -383,7 +383,7 @@ void EditorPropertyArray::update_property() {
|
||||
|
||||
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Element"));
|
||||
button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
button_add_item->connect(SNAME("pressed"), callable_mp(this, &EditorPropertyArray::_add_element));
|
||||
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_add_element));
|
||||
button_add_item->set_disabled(is_read_only());
|
||||
vbox->add_child(button_add_item);
|
||||
|
||||
@ -829,7 +829,7 @@ EditorPropertyArray::EditorPropertyArray() {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
SET_DRAG_FORWARDING_CD(edit, EditorPropertyArray);
|
||||
edit->connect(SceneStringName(draw), callable_mp(this, &EditorPropertyArray::_button_draw));
|
||||
@ -901,7 +901,7 @@ void EditorPropertyDictionary::_create_new_property_slot(int p_idx) {
|
||||
Button *edit_btn = memnew(Button);
|
||||
edit_btn->set_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
edit_btn->set_disabled(is_read_only());
|
||||
edit_btn->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit_btn, slots.size()));
|
||||
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit_btn, slots.size()));
|
||||
hbox->add_child(edit_btn);
|
||||
if (add_panel) {
|
||||
add_panel->get_child(0)->add_child(hbox);
|
||||
@ -1011,7 +1011,7 @@ void EditorPropertyDictionary::update_property() {
|
||||
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Key/Value Pair"));
|
||||
button_add_item->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
|
||||
button_add_item->set_disabled(is_read_only());
|
||||
button_add_item->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_add_key_value));
|
||||
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_add_key_value));
|
||||
add_vbox->add_child(button_add_item);
|
||||
}
|
||||
|
||||
@ -1143,7 +1143,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
@ -1290,7 +1290,7 @@ void EditorPropertyLocalizableString::update_property() {
|
||||
Button *edit_btn = memnew(Button);
|
||||
edit_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
hbox->add_child(edit_btn);
|
||||
edit_btn->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit_btn, remove_index));
|
||||
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit_btn, remove_index));
|
||||
|
||||
prop->update_property();
|
||||
}
|
||||
@ -1298,7 +1298,7 @@ void EditorPropertyLocalizableString::update_property() {
|
||||
if (page_index == max_page) {
|
||||
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Translation"));
|
||||
button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
button_add_item->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_add_locale_popup));
|
||||
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocalizableString::_add_locale_popup));
|
||||
property_vbox->add_child(button_add_item);
|
||||
}
|
||||
|
||||
@ -1358,7 +1358,7 @@ EditorPropertyLocalizableString::EditorPropertyLocalizableString() {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocalizableString::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
|
@ -230,7 +230,7 @@ EditorPropertyVectorN::EditorPropertyVectorN(Variant::Type p_type, bool p_force_
|
||||
linked->set_toggle_mode(true);
|
||||
linked->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
|
||||
linked->set_tooltip_text(TTR("Lock/Unlock Component Ratio"));
|
||||
linked->connect(SNAME("pressed"), callable_mp(this, &EditorPropertyVectorN::_update_ratio));
|
||||
linked->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyVectorN::_update_ratio));
|
||||
linked->connect(SNAME("toggled"), callable_mp(this, &EditorPropertyVectorN::_store_link));
|
||||
hb->add_child(linked);
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
|
||||
assign_button->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
SET_DRAG_FORWARDING_GCD(assign_button, EditorResourcePicker);
|
||||
add_child(assign_button);
|
||||
assign_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_resource_selected));
|
||||
assign_button->connect(SceneStringName(pressed), callable_mp(this, &EditorResourcePicker::_resource_selected));
|
||||
assign_button->connect(SceneStringName(draw), callable_mp(this, &EditorResourcePicker::_button_draw));
|
||||
assign_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorResourcePicker::_button_input));
|
||||
|
||||
@ -1061,7 +1061,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
|
||||
edit_button = memnew(Button);
|
||||
edit_button->set_flat(true);
|
||||
edit_button->set_toggle_mode(true);
|
||||
edit_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_update_menu));
|
||||
edit_button->connect(SceneStringName(pressed), callable_mp(this, &EditorResourcePicker::_update_menu));
|
||||
add_child(edit_button);
|
||||
edit_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorResourcePicker::_button_input));
|
||||
|
||||
|
@ -747,12 +747,12 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
||||
restart_hb->add_child(restart_label);
|
||||
restart_hb->add_spacer();
|
||||
Button *restart_button = memnew(Button);
|
||||
restart_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart));
|
||||
restart_button->connect(SceneStringName(pressed), callable_mp(this, &EditorSettingsDialog::_editor_restart));
|
||||
restart_hb->add_child(restart_button);
|
||||
restart_button->set_text(TTR("Save & Restart"));
|
||||
restart_close_button = memnew(Button);
|
||||
restart_close_button->set_flat(true);
|
||||
restart_close_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart_close));
|
||||
restart_close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorSettingsDialog::_editor_restart_close));
|
||||
restart_hb->add_child(restart_close_button);
|
||||
restart_container->hide();
|
||||
|
||||
@ -784,8 +784,8 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
||||
|
||||
Button *clear_all_search = memnew(Button);
|
||||
clear_all_search->set_text(TTR("Clear All"));
|
||||
clear_all_search->connect("pressed", callable_mp(shortcut_search_box, &LineEdit::clear));
|
||||
clear_all_search->connect("pressed", callable_mp(shortcut_search_by_event, &EventListenerLineEdit::clear_event));
|
||||
clear_all_search->connect(SceneStringName(pressed), callable_mp(shortcut_search_box, &LineEdit::clear));
|
||||
clear_all_search->connect(SceneStringName(pressed), callable_mp(shortcut_search_by_event, &EventListenerLineEdit::clear_event));
|
||||
top_hbox->add_child(clear_all_search);
|
||||
|
||||
shortcuts = memnew(Tree);
|
||||
|
@ -928,13 +928,13 @@ ExportTemplateManager::ExportTemplateManager() {
|
||||
current_open_button->set_text(TTR("Open Folder"));
|
||||
current_open_button->set_tooltip_text(TTR("Open the folder containing installed templates for the current version."));
|
||||
current_installed_hb->add_child(current_open_button);
|
||||
current_open_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_open_template_folder).bind(VERSION_FULL_CONFIG));
|
||||
current_open_button->connect(SceneStringName(pressed), callable_mp(this, &ExportTemplateManager::_open_template_folder).bind(VERSION_FULL_CONFIG));
|
||||
|
||||
current_uninstall_button = memnew(Button);
|
||||
current_uninstall_button->set_text(TTR("Uninstall"));
|
||||
current_uninstall_button->set_tooltip_text(TTR("Uninstall templates for the current version."));
|
||||
current_installed_hb->add_child(current_uninstall_button);
|
||||
current_uninstall_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template).bind(VERSION_FULL_CONFIG));
|
||||
current_uninstall_button->connect(SceneStringName(pressed), callable_mp(this, &ExportTemplateManager::_uninstall_template).bind(VERSION_FULL_CONFIG));
|
||||
|
||||
main_vb->add_child(memnew(HSeparator));
|
||||
|
||||
@ -981,7 +981,7 @@ ExportTemplateManager::ExportTemplateManager() {
|
||||
download_current_button->set_text(TTR("Download and Install"));
|
||||
download_current_button->set_tooltip_text(TTR("Download and install templates for the current version from the best possible mirror."));
|
||||
download_install_hb->add_child(download_current_button);
|
||||
download_current_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_current));
|
||||
download_current_button->connect(SceneStringName(pressed), callable_mp(this, &ExportTemplateManager::_download_current));
|
||||
|
||||
// Update downloads buttons to prevent unsupported downloads.
|
||||
if (!downloads_available) {
|
||||
@ -997,7 +997,7 @@ ExportTemplateManager::ExportTemplateManager() {
|
||||
install_file_button->set_text(TTR("Install from File"));
|
||||
install_file_button->set_tooltip_text(TTR("Install templates from a local file."));
|
||||
install_file_hb->add_child(install_file_button);
|
||||
install_file_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_install_file));
|
||||
install_file_button->connect(SceneStringName(pressed), callable_mp(this, &ExportTemplateManager::_install_file));
|
||||
|
||||
// Templates are being downloaded; buttons unavailable.
|
||||
download_progress_hb = memnew(HBoxContainer);
|
||||
@ -1023,7 +1023,7 @@ ExportTemplateManager::ExportTemplateManager() {
|
||||
download_cancel_button->set_text(TTR("Cancel"));
|
||||
download_cancel_button->set_tooltip_text(TTR("Cancel the download of the templates."));
|
||||
download_progress_hb->add_child(download_cancel_button);
|
||||
download_cancel_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_cancel_template_download));
|
||||
download_cancel_button->connect(SceneStringName(pressed), callable_mp(this, &ExportTemplateManager::_cancel_template_download));
|
||||
|
||||
download_templates = memnew(HTTPRequest);
|
||||
install_templates_hb->add_child(download_templates);
|
||||
|
@ -88,7 +88,7 @@ ProjectExportTextureFormatError::ProjectExportTextureFormatError() {
|
||||
fix_texture_format_button->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
fix_texture_format_button->set_text(TTR("Fix Import"));
|
||||
add_child(fix_texture_format_button);
|
||||
fix_texture_format_button->connect("pressed", callable_mp(this, &ProjectExportTextureFormatError::_on_fix_texture_format_pressed));
|
||||
fix_texture_format_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportTextureFormatError::_on_fix_texture_format_pressed));
|
||||
}
|
||||
|
||||
void ProjectExportDialog::_notification(int p_what) {
|
||||
@ -1251,12 +1251,12 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
duplicate_preset->set_tooltip_text(TTR("Duplicate"));
|
||||
duplicate_preset->set_flat(true);
|
||||
preset_hb->add_child(duplicate_preset);
|
||||
duplicate_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_duplicate_preset));
|
||||
duplicate_preset->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_duplicate_preset));
|
||||
delete_preset = memnew(Button);
|
||||
delete_preset->set_tooltip_text(TTR("Delete"));
|
||||
delete_preset->set_flat(true);
|
||||
preset_hb->add_child(delete_preset);
|
||||
delete_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_delete_preset));
|
||||
delete_preset->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_delete_preset));
|
||||
|
||||
// Preset settings.
|
||||
|
||||
@ -1271,12 +1271,12 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
runnable = memnew(CheckButton);
|
||||
runnable->set_text(TTR("Runnable"));
|
||||
runnable->set_tooltip_text(TTR("If checked, the preset will be available for use in one-click deploy.\nOnly one preset per platform may be marked as runnable."));
|
||||
runnable->connect("pressed", callable_mp(this, &ProjectExportDialog::_runnable_pressed));
|
||||
runnable->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_runnable_pressed));
|
||||
|
||||
advanced_options = memnew(CheckButton);
|
||||
advanced_options->set_text(TTR("Advanced Options"));
|
||||
advanced_options->set_tooltip_text(TTR("If checked, the advanced options will be shown."));
|
||||
advanced_options->connect("pressed", callable_mp(this, &ProjectExportDialog::_advanced_options_pressed));
|
||||
advanced_options->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_advanced_options_pressed));
|
||||
|
||||
HBoxContainer *preset_configs_container = memnew(HBoxContainer);
|
||||
preset_configs_container->add_spacer(true);
|
||||
@ -1434,7 +1434,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
|
||||
LinkButton *sec_more_info = memnew(LinkButton);
|
||||
sec_more_info->set_text(TTR("More Info..."));
|
||||
sec_more_info->connect("pressed", callable_mp(this, &ProjectExportDialog::_open_key_help_link));
|
||||
sec_more_info->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_open_key_help_link));
|
||||
sec_vb->add_child(sec_more_info);
|
||||
|
||||
// Script export parameters.
|
||||
@ -1484,7 +1484,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
export_button = add_button(TTR("Export Project..."), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "export");
|
||||
export_button->set_tooltip_text(TTR("Export the project as a playable build (Godot executable and project data) for the selected preset."));
|
||||
#endif
|
||||
export_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_project));
|
||||
export_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_export_project));
|
||||
// Disable initially before we select a valid preset
|
||||
export_button->set_disabled(true);
|
||||
|
||||
@ -1504,7 +1504,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
#else
|
||||
export_all_button = add_button(TTR("Export All..."), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "export");
|
||||
#endif
|
||||
export_all_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_all_dialog));
|
||||
export_all_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_export_all_dialog));
|
||||
export_all_button->set_disabled(true);
|
||||
|
||||
export_pck_zip = memnew(EditorFileDialog);
|
||||
@ -1554,7 +1554,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||
download_templates->set_text(TTR("Manage Export Templates"));
|
||||
download_templates->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
export_templates_error->add_child(download_templates);
|
||||
download_templates->connect("pressed", callable_mp(this, &ProjectExportDialog::_open_export_template_manager));
|
||||
download_templates->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_open_export_template_manager));
|
||||
|
||||
// Export project file dialog.
|
||||
|
||||
|
@ -153,7 +153,7 @@ FBXImporterManager::FBXImporterManager() {
|
||||
hb->add_child(fbx_path);
|
||||
fbx_path_browse = memnew(Button);
|
||||
fbx_path_browse->set_text(TTR("Browse"));
|
||||
fbx_path_browse->connect("pressed", callable_mp(this, &FBXImporterManager::_browse_install));
|
||||
fbx_path_browse->connect(SceneStringName(pressed), callable_mp(this, &FBXImporterManager::_browse_install));
|
||||
hb->add_child(fbx_path_browse);
|
||||
hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
hb->set_custom_minimum_size(Size2(400 * EDSCALE, 0));
|
||||
@ -168,7 +168,7 @@ FBXImporterManager::FBXImporterManager() {
|
||||
fbx_path->connect("text_changed", callable_mp(this, &FBXImporterManager::_validate_path));
|
||||
|
||||
get_ok_button()->set_text(TTR("Confirm Path"));
|
||||
get_cancel_button()->connect("pressed", callable_mp(this, &FBXImporterManager::_cancel_setup));
|
||||
get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &FBXImporterManager::_cancel_setup));
|
||||
|
||||
browse_dialog = memnew(EditorFileDialog);
|
||||
browse_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
|
||||
|
@ -538,10 +538,10 @@ void FileSystemDock::_notification(int p_what) {
|
||||
EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &FileSystemDock::_fs_changed));
|
||||
EditorResourcePreview::get_singleton()->connect("preview_invalidated", callable_mp(this, &FileSystemDock::_preview_invalidated));
|
||||
|
||||
button_file_list_display_mode->connect("pressed", callable_mp(this, &FileSystemDock::_toggle_file_display));
|
||||
button_file_list_display_mode->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_toggle_file_display));
|
||||
files->connect("item_activated", callable_mp(this, &FileSystemDock::_file_list_activate_file));
|
||||
button_hist_next->connect("pressed", callable_mp(this, &FileSystemDock::_fw_history));
|
||||
button_hist_prev->connect("pressed", callable_mp(this, &FileSystemDock::_bw_history));
|
||||
button_hist_next->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_fw_history));
|
||||
button_hist_prev->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_bw_history));
|
||||
file_list_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_list_rmb_option));
|
||||
tree_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
||||
current_path_line_edit->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false));
|
||||
@ -3959,14 +3959,14 @@ FileSystemDock::FileSystemDock() {
|
||||
toolbar_hbc->add_child(current_path_line_edit);
|
||||
|
||||
button_reload = memnew(Button);
|
||||
button_reload->connect("pressed", callable_mp(this, &FileSystemDock::_rescan));
|
||||
button_reload->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_rescan));
|
||||
button_reload->set_focus_mode(FOCUS_NONE);
|
||||
button_reload->set_tooltip_text(TTR("Re-Scan Filesystem"));
|
||||
button_reload->hide();
|
||||
toolbar_hbc->add_child(button_reload);
|
||||
|
||||
button_toggle_display_mode = memnew(Button);
|
||||
button_toggle_display_mode->connect("pressed", callable_mp(this, &FileSystemDock::_change_split_mode));
|
||||
button_toggle_display_mode->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_change_split_mode));
|
||||
button_toggle_display_mode->set_focus_mode(FOCUS_NONE);
|
||||
button_toggle_display_mode->set_tooltip_text(TTR("Change Split Mode"));
|
||||
button_toggle_display_mode->set_theme_type_variation("FlatMenuButton");
|
||||
@ -3974,7 +3974,7 @@ FileSystemDock::FileSystemDock() {
|
||||
|
||||
button_dock_placement = memnew(Button);
|
||||
button_dock_placement->set_flat(true);
|
||||
button_dock_placement->connect("pressed", callable_mp(this, &FileSystemDock::_change_bottom_dock_placement));
|
||||
button_dock_placement->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_change_bottom_dock_placement));
|
||||
button_dock_placement->hide();
|
||||
toolbar_hbc->add_child(button_dock_placement);
|
||||
|
||||
@ -4093,7 +4093,7 @@ FileSystemDock::FileSystemDock() {
|
||||
overwrite_dialog = memnew(ConfirmationDialog);
|
||||
add_child(overwrite_dialog);
|
||||
overwrite_dialog->set_ok_button_text(TTR("Overwrite"));
|
||||
overwrite_dialog->add_button(TTR("Keep Both"), true)->connect("pressed", callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(false));
|
||||
overwrite_dialog->add_button(TTR("Keep Both"), true)->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(false));
|
||||
overwrite_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(true));
|
||||
|
||||
VBoxContainer *overwrite_dialog_vb = memnew(VBoxContainer);
|
||||
|
@ -367,7 +367,7 @@ FindInFilesDialog::FindInFilesDialog() {
|
||||
|
||||
Button *folder_button = memnew(Button);
|
||||
folder_button->set_text("...");
|
||||
folder_button->connect("pressed", callable_mp(this, &FindInFilesDialog::_on_folder_button_pressed));
|
||||
folder_button->connect(SceneStringName(pressed), callable_mp(this, &FindInFilesDialog::_on_folder_button_pressed));
|
||||
hbc->add_child(folder_button);
|
||||
|
||||
_folder_dialog = memnew(FileDialog);
|
||||
@ -603,19 +603,19 @@ FindInFilesPanel::FindInFilesPanel() {
|
||||
|
||||
_refresh_button = memnew(Button);
|
||||
_refresh_button->set_text(TTR("Refresh"));
|
||||
_refresh_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_refresh_button_clicked));
|
||||
_refresh_button->connect(SceneStringName(pressed), callable_mp(this, &FindInFilesPanel::_on_refresh_button_clicked));
|
||||
_refresh_button->hide();
|
||||
hbc->add_child(_refresh_button);
|
||||
|
||||
_cancel_button = memnew(Button);
|
||||
_cancel_button->set_text(TTR("Cancel"));
|
||||
_cancel_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_cancel_button_clicked));
|
||||
_cancel_button->connect(SceneStringName(pressed), callable_mp(this, &FindInFilesPanel::_on_cancel_button_clicked));
|
||||
_cancel_button->hide();
|
||||
hbc->add_child(_cancel_button);
|
||||
|
||||
_close_button = memnew(Button);
|
||||
_close_button->set_text(TTR("Close"));
|
||||
_close_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_close_button_clicked));
|
||||
_close_button->connect(SceneStringName(pressed), callable_mp(this, &FindInFilesPanel::_on_close_button_clicked));
|
||||
hbc->add_child(_close_button);
|
||||
|
||||
vbc->add_child(hbc);
|
||||
@ -649,7 +649,7 @@ FindInFilesPanel::FindInFilesPanel() {
|
||||
|
||||
_replace_all_button = memnew(Button);
|
||||
_replace_all_button->set_text(TTR("Replace all (no undo)"));
|
||||
_replace_all_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_replace_all_clicked));
|
||||
_replace_all_button->connect(SceneStringName(pressed), callable_mp(this, &FindInFilesPanel::_on_replace_all_clicked));
|
||||
_replace_container->add_child(_replace_all_button);
|
||||
|
||||
_replace_container->hide();
|
||||
|
@ -516,7 +516,7 @@ GroupSettingsEditor::GroupSettingsEditor() {
|
||||
add_button = memnew(Button);
|
||||
add_button->set_text(TTR("Add"));
|
||||
add_button->set_disabled(true);
|
||||
add_button->connect("pressed", callable_mp(this, &GroupSettingsEditor::_add_group));
|
||||
add_button->connect(SceneStringName(pressed), callable_mp(this, &GroupSettingsEditor::_add_group));
|
||||
hbc->add_child(add_button);
|
||||
|
||||
tree = memnew(Tree);
|
||||
|
@ -836,7 +836,7 @@ GroupsEditor::GroupsEditor() {
|
||||
add = memnew(Button);
|
||||
add->set_flat(true);
|
||||
add->set_tooltip_text(TTR("Add a new group."));
|
||||
add->connect("pressed", callable_mp(this, &GroupsEditor::_show_add_group_dialog));
|
||||
add->connect(SceneStringName(pressed), callable_mp(this, &GroupsEditor::_show_add_group_dialog));
|
||||
hbc->add_child(add);
|
||||
|
||||
filter = memnew(LineEdit);
|
||||
|
@ -265,7 +265,7 @@ EditorBottomPanel::EditorBottomPanel() {
|
||||
build_date = TTR("(unknown)");
|
||||
}
|
||||
version_btn->set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version information."), build_date));
|
||||
version_btn->connect("pressed", callable_mp(this, &EditorBottomPanel::_version_button_pressed));
|
||||
version_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorBottomPanel::_version_button_pressed));
|
||||
version_btn->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
bottom_hbox->add_child(version_btn);
|
||||
|
||||
|
@ -213,7 +213,7 @@ EditorDirDialog::EditorDirDialog() {
|
||||
|
||||
makedir = memnew(Button(TTR("Create Folder")));
|
||||
hb->add_child(makedir);
|
||||
makedir->connect("pressed", callable_mp(this, &EditorDirDialog::_make_dir));
|
||||
makedir->connect(SceneStringName(pressed), callable_mp(this, &EditorDirDialog::_make_dir));
|
||||
|
||||
tree = memnew(Tree);
|
||||
vb->add_child(tree);
|
||||
@ -224,7 +224,7 @@ EditorDirDialog::EditorDirDialog() {
|
||||
set_ok_button_text(TTR("Move"));
|
||||
|
||||
copy = add_button(TTR("Copy"), !DisplayServer::get_singleton()->get_swap_cancel_ok());
|
||||
copy->connect("pressed", callable_mp(this, &EditorDirDialog::_copy_pressed));
|
||||
copy->connect(SceneStringName(pressed), callable_mp(this, &EditorDirDialog::_copy_pressed));
|
||||
|
||||
makedialog = memnew(DirectoryCreateDialog);
|
||||
add_child(makedialog);
|
||||
|
@ -2109,9 +2109,9 @@ EditorFileDialog::EditorFileDialog() {
|
||||
pathhb->add_child(dir_next);
|
||||
pathhb->add_child(dir_up);
|
||||
|
||||
dir_prev->connect("pressed", callable_mp(this, &EditorFileDialog::_go_back));
|
||||
dir_next->connect("pressed", callable_mp(this, &EditorFileDialog::_go_forward));
|
||||
dir_up->connect("pressed", callable_mp(this, &EditorFileDialog::_go_up));
|
||||
dir_prev->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_go_back));
|
||||
dir_next->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_go_forward));
|
||||
dir_up->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_go_up));
|
||||
|
||||
Label *l = memnew(Label(TTR("Path:")));
|
||||
l->set_theme_type_variation("HeaderSmall");
|
||||
@ -2128,14 +2128,14 @@ EditorFileDialog::EditorFileDialog() {
|
||||
refresh = memnew(Button);
|
||||
refresh->set_theme_type_variation("FlatButton");
|
||||
refresh->set_tooltip_text(TTR("Refresh files."));
|
||||
refresh->connect("pressed", callable_mp(this, &EditorFileDialog::update_file_list));
|
||||
refresh->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::update_file_list));
|
||||
pathhb->add_child(refresh);
|
||||
|
||||
favorite = memnew(Button);
|
||||
favorite->set_theme_type_variation("FlatButton");
|
||||
favorite->set_toggle_mode(true);
|
||||
favorite->set_tooltip_text(TTR("(Un)favorite current folder."));
|
||||
favorite->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_pressed));
|
||||
favorite->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_pressed));
|
||||
pathhb->add_child(favorite);
|
||||
|
||||
show_hidden = memnew(Button);
|
||||
@ -2153,7 +2153,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
|
||||
mode_thumbnails = memnew(Button);
|
||||
mode_thumbnails->set_theme_type_variation("FlatButton");
|
||||
mode_thumbnails->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_THUMBNAILS));
|
||||
mode_thumbnails->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_THUMBNAILS));
|
||||
mode_thumbnails->set_toggle_mode(true);
|
||||
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
|
||||
mode_thumbnails->set_button_group(view_mode_group);
|
||||
@ -2162,7 +2162,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
|
||||
mode_list = memnew(Button);
|
||||
mode_list->set_theme_type_variation("FlatButton");
|
||||
mode_list->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_LIST));
|
||||
mode_list->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_LIST));
|
||||
mode_list->set_toggle_mode(true);
|
||||
mode_list->set_pressed(display_mode == DISPLAY_LIST);
|
||||
mode_list->set_button_group(view_mode_group);
|
||||
@ -2181,7 +2181,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
makedir = memnew(Button);
|
||||
makedir->set_theme_type_variation("FlatButton");
|
||||
makedir->set_tooltip_text(TTR("Create a new folder."));
|
||||
makedir->connect("pressed", callable_mp(this, &EditorFileDialog::_make_dir));
|
||||
makedir->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_make_dir));
|
||||
pathhb->add_child(makedir);
|
||||
|
||||
body_hsplit = memnew(HSplitContainer);
|
||||
@ -2215,11 +2215,11 @@ EditorFileDialog::EditorFileDialog() {
|
||||
fav_up = memnew(Button);
|
||||
fav_up->set_theme_type_variation("FlatButton");
|
||||
fav_hb->add_child(fav_up);
|
||||
fav_up->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_up));
|
||||
fav_up->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_move_up));
|
||||
fav_down = memnew(Button);
|
||||
fav_down->set_theme_type_variation("FlatButton");
|
||||
fav_hb->add_child(fav_down);
|
||||
fav_down->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_down));
|
||||
fav_down->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_move_down));
|
||||
|
||||
favorites = memnew(ItemList);
|
||||
favorites->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
@ -211,7 +211,7 @@ void EditorObjectSelector::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
connect("pressed", callable_mp(this, &EditorObjectSelector::_show_popup));
|
||||
connect(SceneStringName(pressed), callable_mp(this, &EditorObjectSelector::_show_popup));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ EditorRunBar::EditorRunBar() {
|
||||
play_button->set_toggle_mode(true);
|
||||
play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_button->set_tooltip_text(TTR("Run the project's default scene."));
|
||||
play_button->connect("pressed", callable_mp(this, &EditorRunBar::play_main_scene).bind(false));
|
||||
play_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::play_main_scene).bind(false));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_project", TTR("Run Project"), Key::F5);
|
||||
ED_SHORTCUT_OVERRIDE("editor/run_project", "macos", KeyModifierMask::META | Key::B);
|
||||
@ -400,7 +400,7 @@ EditorRunBar::EditorRunBar() {
|
||||
stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
stop_button->set_tooltip_text(TTR("Stop the currently running project."));
|
||||
stop_button->set_disabled(true);
|
||||
stop_button->connect("pressed", callable_mp(this, &EditorRunBar::stop_playing));
|
||||
stop_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::stop_playing));
|
||||
|
||||
ED_SHORTCUT("editor/stop_running_project", TTR("Stop Running Project"), Key::F8);
|
||||
ED_SHORTCUT_OVERRIDE("editor/stop_running_project", "macos", KeyModifierMask::META | Key::PERIOD);
|
||||
@ -416,7 +416,7 @@ EditorRunBar::EditorRunBar() {
|
||||
play_scene_button->set_toggle_mode(true);
|
||||
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_scene_button->set_tooltip_text(TTR("Run the currently edited scene."));
|
||||
play_scene_button->connect("pressed", callable_mp(this, &EditorRunBar::_play_current_pressed));
|
||||
play_scene_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::_play_current_pressed));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_current_scene", TTR("Run Current Scene"), Key::F6);
|
||||
ED_SHORTCUT_OVERRIDE("editor/run_current_scene", "macos", KeyModifierMask::META | Key::R);
|
||||
@ -428,7 +428,7 @@ EditorRunBar::EditorRunBar() {
|
||||
play_custom_scene_button->set_toggle_mode(true);
|
||||
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_custom_scene_button->set_tooltip_text(TTR("Run a specific scene."));
|
||||
play_custom_scene_button->connect("pressed", callable_mp(this, &EditorRunBar::_play_custom_pressed));
|
||||
play_custom_scene_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::_play_custom_pressed));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F5);
|
||||
ED_SHORTCUT_OVERRIDE("editor/run_specific_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R);
|
||||
|
@ -415,7 +415,7 @@ EditorSceneTabs::EditorSceneTabs() {
|
||||
scene_tab_add->set_flat(true);
|
||||
scene_tab_add->set_tooltip_text(TTR("Add a new scene."));
|
||||
scene_tabs->add_child(scene_tab_add);
|
||||
scene_tab_add->connect("pressed", callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(EditorNode::FILE_NEW_SCENE, false));
|
||||
scene_tab_add->connect(SceneStringName(pressed), callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(EditorNode::FILE_NEW_SCENE, false));
|
||||
|
||||
scene_tab_add_ph = memnew(Control);
|
||||
scene_tab_add_ph->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
|
||||
|
@ -376,7 +376,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
|
||||
Button *close_button = memnew(Button);
|
||||
close_button->set_flat(true);
|
||||
close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
|
||||
close_button->connect("pressed", callable_mp(this, &EditorToaster::close).bind(panel));
|
||||
close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::close).bind(panel));
|
||||
close_button->connect(SceneStringName(theme_changed), callable_mp(this, &EditorToaster::_close_button_theme_changed).bind(close_button));
|
||||
hbox_container->add_child(close_button);
|
||||
}
|
||||
@ -544,8 +544,8 @@ EditorToaster::EditorToaster() {
|
||||
main_button->set_modulate(Color(0.5, 0.5, 0.5));
|
||||
main_button->set_disabled(true);
|
||||
main_button->set_theme_type_variation("FlatMenuButton");
|
||||
main_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(true));
|
||||
main_button->connect("pressed", callable_mp(this, &EditorToaster::_repop_old));
|
||||
main_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(true));
|
||||
main_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::_repop_old));
|
||||
main_button->connect(SceneStringName(draw), callable_mp(this, &EditorToaster::_draw_button));
|
||||
add_child(main_button);
|
||||
|
||||
@ -558,7 +558,7 @@ EditorToaster::EditorToaster() {
|
||||
disable_notifications_button = memnew(Button);
|
||||
disable_notifications_button->set_tooltip_text(TTR("Silence the notifications."));
|
||||
disable_notifications_button->set_flat(true);
|
||||
disable_notifications_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(false));
|
||||
disable_notifications_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(false));
|
||||
disable_notifications_panel->add_child(disable_notifications_button);
|
||||
|
||||
// Other
|
||||
|
@ -199,7 +199,7 @@ EditorZoomWidget::EditorZoomWidget() {
|
||||
zoom_minus->set_shortcut_context(this);
|
||||
zoom_minus->set_focus_mode(FOCUS_NONE);
|
||||
add_child(zoom_minus);
|
||||
zoom_minus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_minus));
|
||||
zoom_minus->connect(SceneStringName(pressed), callable_mp(this, &EditorZoomWidget::_button_zoom_minus));
|
||||
|
||||
zoom_reset = memnew(Button);
|
||||
zoom_reset->set_flat(true);
|
||||
@ -208,7 +208,7 @@ EditorZoomWidget::EditorZoomWidget() {
|
||||
zoom_reset->add_theme_style_override("normal", empty_stylebox);
|
||||
zoom_reset->add_theme_style_override("hover", empty_stylebox);
|
||||
zoom_reset->add_theme_style_override("focus", empty_stylebox);
|
||||
zoom_reset->add_theme_style_override("pressed", empty_stylebox);
|
||||
zoom_reset->add_theme_style_override(SceneStringName(pressed), empty_stylebox);
|
||||
zoom_reset->add_theme_constant_override("outline_size", Math::ceil(2 * EDSCALE));
|
||||
zoom_reset->add_theme_color_override("font_outline_color", Color(0, 0, 0));
|
||||
zoom_reset->add_theme_color_override("font_color", Color(1, 1, 1));
|
||||
@ -220,7 +220,7 @@ EditorZoomWidget::EditorZoomWidget() {
|
||||
// Prevent the button's size from changing when the text size changes
|
||||
zoom_reset->set_custom_minimum_size(Size2(56 * EDSCALE, 0));
|
||||
add_child(zoom_reset);
|
||||
zoom_reset->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_reset));
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &EditorZoomWidget::_button_zoom_reset));
|
||||
|
||||
zoom_plus = memnew(Button);
|
||||
zoom_plus->set_flat(true);
|
||||
@ -228,7 +228,7 @@ EditorZoomWidget::EditorZoomWidget() {
|
||||
zoom_plus->set_shortcut_context(this);
|
||||
zoom_plus->set_focus_mode(FOCUS_NONE);
|
||||
add_child(zoom_plus);
|
||||
zoom_plus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_plus));
|
||||
zoom_plus->connect(SceneStringName(pressed), callable_mp(this, &EditorZoomWidget::_button_zoom_plus));
|
||||
|
||||
_update_zoom_label();
|
||||
|
||||
|
@ -1263,7 +1263,7 @@ void SceneImportSettingsDialog::_notification(int p_what) {
|
||||
action_menu->begin_bulk_theme_override();
|
||||
action_menu->add_theme_style_override("normal", get_theme_stylebox("normal", "Button"));
|
||||
action_menu->add_theme_style_override("hover", get_theme_stylebox("hover", "Button"));
|
||||
action_menu->add_theme_style_override("pressed", get_theme_stylebox("pressed", "Button"));
|
||||
action_menu->add_theme_style_override(SceneStringName(pressed), get_theme_stylebox(SceneStringName(pressed), "Button"));
|
||||
action_menu->end_bulk_theme_override();
|
||||
|
||||
if (animation_player != nullptr && animation_player->is_playing()) {
|
||||
@ -1649,13 +1649,13 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
|
||||
animation_play_button->set_flat(true);
|
||||
animation_play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
animation_play_button->set_shortcut(ED_SHORTCUT("scene_import_settings/play_selected_animation", TTR("Selected Animation Play/Pause"), Key::SPACE));
|
||||
animation_play_button->connect(SNAME("pressed"), callable_mp(this, &SceneImportSettingsDialog::_play_animation));
|
||||
animation_play_button->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_play_animation));
|
||||
|
||||
animation_stop_button = memnew(Button);
|
||||
animation_hbox->add_child(animation_stop_button);
|
||||
animation_stop_button->set_flat(true);
|
||||
animation_stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
animation_stop_button->connect(SNAME("pressed"), callable_mp(this, &SceneImportSettingsDialog::_stop_current_animation));
|
||||
animation_stop_button->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_stop_current_animation));
|
||||
|
||||
animation_slider = memnew(HSlider);
|
||||
animation_hbox->add_child(animation_slider);
|
||||
@ -1684,7 +1684,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
|
||||
light_rotate_switch->set_toggle_mode(true);
|
||||
light_rotate_switch->set_pressed(true);
|
||||
light_rotate_switch->set_tooltip_text(TTR("Rotate Lights With Model"));
|
||||
light_rotate_switch->connect("pressed", callable_mp(this, &SceneImportSettingsDialog::_on_light_rotate_switch_pressed));
|
||||
light_rotate_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_rotate_switch_pressed));
|
||||
vb_light->add_child(light_rotate_switch);
|
||||
|
||||
light_1_switch = memnew(Button);
|
||||
@ -1692,7 +1692,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
|
||||
light_1_switch->set_toggle_mode(true);
|
||||
light_1_switch->set_pressed(true);
|
||||
light_1_switch->set_tooltip_text(TTR("Primary Light"));
|
||||
light_1_switch->connect("pressed", callable_mp(this, &SceneImportSettingsDialog::_on_light_1_switch_pressed));
|
||||
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_1_switch_pressed));
|
||||
vb_light->add_child(light_1_switch);
|
||||
|
||||
light_2_switch = memnew(Button);
|
||||
@ -1700,7 +1700,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
|
||||
light_2_switch->set_toggle_mode(true);
|
||||
light_2_switch->set_pressed(true);
|
||||
light_2_switch->set_tooltip_text(TTR("Secondary Light"));
|
||||
light_2_switch->connect("pressed", callable_mp(this, &SceneImportSettingsDialog::_on_light_2_switch_pressed));
|
||||
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_2_switch_pressed));
|
||||
vb_light->add_child(light_2_switch);
|
||||
|
||||
camera = memnew(Camera3D);
|
||||
|
@ -618,9 +618,9 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
|
||||
zoom_hbox->add_child(zoom_out);
|
||||
zoom_hbox->add_child(zoom_reset);
|
||||
zoom_hbox->add_child(zoom_in);
|
||||
zoom_in->connect("pressed", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_in));
|
||||
zoom_reset->connect("pressed", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_reset));
|
||||
zoom_out->connect("pressed", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_out));
|
||||
zoom_in->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_in));
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_reset));
|
||||
zoom_out->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_out));
|
||||
zoom_bar->connect("value_changed", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_zoom_offset_changed));
|
||||
vbox->add_child(zoom_hbox);
|
||||
|
||||
@ -639,13 +639,13 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
|
||||
_play_button->set_flat(true);
|
||||
hbox->add_child(_play_button);
|
||||
_play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_play_button->connect("pressed", callable_mp(this, &AudioStreamImportSettingsDialog::_play));
|
||||
_play_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamImportSettingsDialog::_play));
|
||||
|
||||
_stop_button = memnew(Button);
|
||||
_stop_button->set_flat(true);
|
||||
hbox->add_child(_stop_button);
|
||||
_stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_stop_button->connect("pressed", callable_mp(this, &AudioStreamImportSettingsDialog::_stop));
|
||||
_stop_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamImportSettingsDialog::_stop));
|
||||
|
||||
_current_label = memnew(Label);
|
||||
_current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
|
@ -1372,7 +1372,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
||||
add_var = memnew(Button);
|
||||
add_var->set_tooltip_text(TTR("Add configuration"));
|
||||
page2_hb_vars->add_child(add_var);
|
||||
add_var->connect("pressed", callable_mp(this, &DynamicFontImportSettingsDialog::_variation_add));
|
||||
add_var->connect(SceneStringName(pressed), callable_mp(this, &DynamicFontImportSettingsDialog::_variation_add));
|
||||
|
||||
vars_list = memnew(Tree);
|
||||
vars_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
@ -1414,7 +1414,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
||||
Button *btn_clear = memnew(Button);
|
||||
btn_clear->set_text(TTR("Clear Glyph List"));
|
||||
gl_hb->add_child(btn_clear);
|
||||
btn_clear->connect("pressed", callable_mp(this, &DynamicFontImportSettingsDialog::_glyph_clear));
|
||||
btn_clear->connect(SceneStringName(pressed), callable_mp(this, &DynamicFontImportSettingsDialog::_glyph_clear));
|
||||
|
||||
VBoxContainer *page2_0_vb = memnew(VBoxContainer);
|
||||
page2_0_vb->set_name(TTR("Glyphs from the Translations"));
|
||||
@ -1446,7 +1446,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
||||
btn_fill_locales = memnew(Button);
|
||||
btn_fill_locales->set_text(TTR("Shape all Strings in the Translations and Add Glyphs"));
|
||||
locale_hb->add_child(btn_fill_locales);
|
||||
btn_fill_locales->connect("pressed", callable_mp(this, &DynamicFontImportSettingsDialog::_process_locales));
|
||||
btn_fill_locales->connect(SceneStringName(pressed), callable_mp(this, &DynamicFontImportSettingsDialog::_process_locales));
|
||||
|
||||
// Page 2.1 layout: Text to select glyphs
|
||||
VBoxContainer *page2_1_vb = memnew(VBoxContainer);
|
||||
@ -1484,7 +1484,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
||||
btn_fill = memnew(Button);
|
||||
btn_fill->set_text(TTR("Shape Text and Add Glyphs"));
|
||||
text_hb->add_child(btn_fill);
|
||||
btn_fill->connect("pressed", callable_mp(this, &DynamicFontImportSettingsDialog::_glyph_text_selected));
|
||||
btn_fill->connect(SceneStringName(pressed), callable_mp(this, &DynamicFontImportSettingsDialog::_glyph_text_selected));
|
||||
|
||||
// Page 2.2 layout: Character map
|
||||
VBoxContainer *page2_2_vb = memnew(VBoxContainer);
|
||||
|
@ -211,7 +211,7 @@ ImportDefaultsEditor::ImportDefaultsEditor() {
|
||||
reset_defaults = memnew(Button);
|
||||
reset_defaults->set_text(TTR("Reset to Defaults"));
|
||||
reset_defaults->set_disabled(true);
|
||||
reset_defaults->connect("pressed", callable_mp(this, &ImportDefaultsEditor::_reset));
|
||||
reset_defaults->connect(SceneStringName(pressed), callable_mp(this, &ImportDefaultsEditor::_reset));
|
||||
hb->add_child(reset_defaults);
|
||||
add_child(hb);
|
||||
|
||||
@ -225,7 +225,7 @@ ImportDefaultsEditor::ImportDefaultsEditor() {
|
||||
CenterContainer *cc = memnew(CenterContainer);
|
||||
save_defaults = memnew(Button);
|
||||
save_defaults->set_text(TTR("Save"));
|
||||
save_defaults->connect("pressed", callable_mp(this, &ImportDefaultsEditor::_save));
|
||||
save_defaults->connect(SceneStringName(pressed), callable_mp(this, &ImportDefaultsEditor::_save));
|
||||
cc->add_child(save_defaults);
|
||||
add_child(cc);
|
||||
|
||||
|
@ -798,7 +798,7 @@ ImportDock::ImportDock() {
|
||||
import = memnew(Button);
|
||||
import->set_text(TTR("Reimport"));
|
||||
import->set_disabled(true);
|
||||
import->connect("pressed", callable_mp(this, &ImportDock::_reimport_pressed));
|
||||
import->connect(SceneStringName(pressed), callable_mp(this, &ImportDock::_reimport_pressed));
|
||||
if (!DisplayServer::get_singleton()->get_swap_cancel_ok()) {
|
||||
advanced_spacer = hb->add_spacer();
|
||||
advanced = memnew(Button);
|
||||
@ -818,7 +818,7 @@ ImportDock::ImportDock() {
|
||||
|
||||
advanced->hide();
|
||||
advanced_spacer->hide();
|
||||
advanced->connect("pressed", callable_mp(this, &ImportDock::_advanced_options));
|
||||
advanced->connect(SceneStringName(pressed), callable_mp(this, &ImportDock::_advanced_options));
|
||||
|
||||
reimport_confirm = memnew(ConfirmationDialog);
|
||||
content->add_child(reimport_confirm);
|
||||
|
@ -649,14 +649,14 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
||||
resource_new_button->set_theme_type_variation("FlatMenuButton");
|
||||
resource_new_button->set_tooltip_text(TTR("Create a new resource in memory and edit it."));
|
||||
general_options_hb->add_child(resource_new_button);
|
||||
resource_new_button->connect("pressed", callable_mp(this, &InspectorDock::_new_resource));
|
||||
resource_new_button->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_new_resource));
|
||||
resource_new_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
|
||||
resource_load_button = memnew(Button);
|
||||
resource_load_button->set_theme_type_variation("FlatMenuButton");
|
||||
resource_load_button->set_tooltip_text(TTR("Load an existing resource from disk and edit it."));
|
||||
general_options_hb->add_child(resource_load_button);
|
||||
resource_load_button->connect("pressed", callable_mp(this, &InspectorDock::_open_resource_selector));
|
||||
resource_load_button->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_open_resource_selector));
|
||||
resource_load_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
|
||||
resource_save_button = memnew(MenuButton);
|
||||
@ -692,14 +692,14 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
||||
general_options_hb->add_child(backward_button);
|
||||
backward_button->set_tooltip_text(TTR("Go to previous edited object in history."));
|
||||
backward_button->set_disabled(true);
|
||||
backward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_back));
|
||||
backward_button->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_edit_back));
|
||||
|
||||
forward_button = memnew(Button);
|
||||
forward_button->set_flat(true);
|
||||
general_options_hb->add_child(forward_button);
|
||||
forward_button->set_tooltip_text(TTR("Go to next edited object in history."));
|
||||
forward_button->set_disabled(true);
|
||||
forward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_forward));
|
||||
forward_button->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_edit_forward));
|
||||
|
||||
history_menu = memnew(MenuButton);
|
||||
history_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
@ -722,7 +722,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
||||
open_docs_button->set_tooltip_text(TTR("Open documentation for this object."));
|
||||
open_docs_button->set_shortcut(ED_SHORTCUT("property_editor/open_help", TTR("Open Documentation")));
|
||||
subresource_hb->add_child(open_docs_button);
|
||||
open_docs_button->connect("pressed", callable_mp(this, &InspectorDock::_menu_option).bind(OBJECT_REQUEST_HELP));
|
||||
open_docs_button->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_menu_option).bind(OBJECT_REQUEST_HELP));
|
||||
|
||||
new_resource_dialog = memnew(CreateDialog);
|
||||
EditorNode::get_singleton()->get_gui_base()->add_child(new_resource_dialog);
|
||||
@ -751,7 +751,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
||||
add_child(info);
|
||||
info->set_clip_text(true);
|
||||
info->hide();
|
||||
info->connect("pressed", callable_mp(this, &InspectorDock::_info_pressed));
|
||||
info->connect(SceneStringName(pressed), callable_mp(this, &InspectorDock::_info_pressed));
|
||||
|
||||
unique_resources_confirmation = memnew(ConfirmationDialog);
|
||||
add_child(unique_resources_confirmation);
|
||||
|
@ -626,7 +626,7 @@ LocalizationEditor::LocalizationEditor() {
|
||||
tvb->add_child(thb);
|
||||
|
||||
Button *addtr = memnew(Button(TTR("Add...")));
|
||||
addtr->connect("pressed", callable_mp(this, &LocalizationEditor::_translation_file_open));
|
||||
addtr->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_translation_file_open));
|
||||
thb->add_child(addtr);
|
||||
|
||||
VBoxContainer *tmc = memnew(VBoxContainer);
|
||||
@ -660,7 +660,7 @@ LocalizationEditor::LocalizationEditor() {
|
||||
tvb->add_child(thb);
|
||||
|
||||
Button *addtr = memnew(Button(TTR("Add...")));
|
||||
addtr->connect("pressed", callable_mp(this, &LocalizationEditor::_translation_res_file_open));
|
||||
addtr->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_translation_res_file_open));
|
||||
thb->add_child(addtr);
|
||||
|
||||
VBoxContainer *tmc = memnew(VBoxContainer);
|
||||
@ -686,7 +686,7 @@ LocalizationEditor::LocalizationEditor() {
|
||||
tvb->add_child(thb);
|
||||
|
||||
addtr = memnew(Button(TTR("Add...")));
|
||||
addtr->connect("pressed", callable_mp(this, &LocalizationEditor::_translation_res_option_file_open));
|
||||
addtr->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_translation_res_option_file_open));
|
||||
translation_res_option_add_button = addtr;
|
||||
thb->add_child(addtr);
|
||||
|
||||
@ -729,11 +729,11 @@ LocalizationEditor::LocalizationEditor() {
|
||||
tvb->add_child(thb);
|
||||
|
||||
Button *addtr = memnew(Button(TTR("Add...")));
|
||||
addtr->connect("pressed", callable_mp(this, &LocalizationEditor::_pot_file_open));
|
||||
addtr->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_pot_file_open));
|
||||
thb->add_child(addtr);
|
||||
|
||||
pot_generate_button = memnew(Button(TTR("Generate POT")));
|
||||
pot_generate_button->connect("pressed", callable_mp(this, &LocalizationEditor::_pot_generate_open));
|
||||
pot_generate_button->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_pot_generate_open));
|
||||
thb->add_child(pot_generate_button);
|
||||
|
||||
translation_pot_list = memnew(Tree);
|
||||
@ -742,7 +742,7 @@ LocalizationEditor::LocalizationEditor() {
|
||||
|
||||
translation_pot_add_builtin = memnew(CheckBox(TTR("Add Built-in Strings to POT")));
|
||||
translation_pot_add_builtin->set_tooltip_text(TTR("Add strings from built-in components such as certain Control nodes."));
|
||||
translation_pot_add_builtin->connect("pressed", callable_mp(this, &LocalizationEditor::_pot_add_builtin_toggled));
|
||||
translation_pot_add_builtin->connect(SceneStringName(pressed), callable_mp(this, &LocalizationEditor::_pot_add_builtin_toggled));
|
||||
tvb->add_child(translation_pot_add_builtin);
|
||||
|
||||
pot_generate_dialog = memnew(EditorFileDialog);
|
||||
|
@ -120,7 +120,7 @@ NodeDock::NodeDock() {
|
||||
connections_button->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
connections_button->set_clip_text(true);
|
||||
mode_hb->add_child(connections_button);
|
||||
connections_button->connect("pressed", callable_mp(this, &NodeDock::show_connections));
|
||||
connections_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_connections));
|
||||
|
||||
groups_button = memnew(Button);
|
||||
groups_button->set_theme_type_variation("FlatButton");
|
||||
@ -130,7 +130,7 @@ NodeDock::NodeDock() {
|
||||
groups_button->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
groups_button->set_clip_text(true);
|
||||
mode_hb->add_child(groups_button);
|
||||
groups_button->connect("pressed", callable_mp(this, &NodeDock::show_groups));
|
||||
groups_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_groups));
|
||||
|
||||
connections = memnew(ConnectionsDock);
|
||||
add_child(connections);
|
||||
|
@ -730,19 +730,19 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
add_child(button_create);
|
||||
button_create->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
add_child(button_edit);
|
||||
button_edit->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
||||
button_delete = memnew(Button);
|
||||
button_delete->set_theme_type_variation("FlatButton");
|
||||
add_child(button_delete);
|
||||
button_delete->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_DELETE));
|
||||
button_delete->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_DELETE));
|
||||
button_delete->set_toggle_mode(true);
|
||||
|
||||
create_resource = memnew(ConfirmationDialog);
|
||||
|
@ -667,7 +667,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
top_hb->add_child(tool_blend);
|
||||
tool_blend->set_pressed(true);
|
||||
tool_blend->set_tooltip_text(TTR("Set the blending position within the space"));
|
||||
tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(3));
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
tool_select->set_theme_type_variation("FlatButton");
|
||||
@ -675,7 +675,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_tooltip_text(TTR("Select and move points, create points with RMB."));
|
||||
tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(0));
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
@ -683,7 +683,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_tooltip_text(TTR("Create points."));
|
||||
tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(1));
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(1));
|
||||
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
top_hb->add_child(tool_erase_sep);
|
||||
@ -691,7 +691,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip_text(TTR("Erase points."));
|
||||
tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
@ -701,7 +701,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
snap->set_tooltip_text(TTR("Enable snap and show grid."));
|
||||
snap->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_snap_toggled));
|
||||
snap->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_snap_toggled));
|
||||
|
||||
snap_value = memnew(SpinBox);
|
||||
top_hb->add_child(snap_value);
|
||||
@ -737,7 +737,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
open_editor = memnew(Button);
|
||||
edit_hb->add_child(open_editor);
|
||||
open_editor->set_text(TTR("Open Editor"));
|
||||
open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), CONNECT_DEFERRED);
|
||||
open_editor->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), CONNECT_DEFERRED);
|
||||
|
||||
edit_hb->hide();
|
||||
open_editor->hide();
|
||||
|
@ -888,7 +888,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
top_hb->add_child(tool_blend);
|
||||
tool_blend->set_pressed(true);
|
||||
tool_blend->set_tooltip_text(TTR("Set the blending position within the space"));
|
||||
tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(3));
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
tool_select->set_theme_type_variation("FlatButton");
|
||||
@ -896,7 +896,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_tooltip_text(TTR("Select and move points, create points with RMB."));
|
||||
tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(0));
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
@ -904,7 +904,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_tooltip_text(TTR("Create points."));
|
||||
tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(1));
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(1));
|
||||
|
||||
tool_triangle = memnew(Button);
|
||||
tool_triangle->set_theme_type_variation("FlatButton");
|
||||
@ -912,7 +912,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_triangle->set_button_group(bg);
|
||||
top_hb->add_child(tool_triangle);
|
||||
tool_triangle->set_tooltip_text(TTR("Create triangles by connecting points."));
|
||||
tool_triangle->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(2));
|
||||
tool_triangle->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(2));
|
||||
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
top_hb->add_child(tool_erase_sep);
|
||||
@ -920,7 +920,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip_text(TTR("Erase points and triangles."));
|
||||
tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected));
|
||||
tool_erase->set_disabled(true);
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
@ -928,7 +928,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
auto_triangles = memnew(Button);
|
||||
auto_triangles->set_theme_type_variation("FlatButton");
|
||||
top_hb->add_child(auto_triangles);
|
||||
auto_triangles->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled));
|
||||
auto_triangles->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled));
|
||||
auto_triangles->set_toggle_mode(true);
|
||||
auto_triangles->set_tooltip_text(TTR("Generate blend triangles automatically (instead of manually)"));
|
||||
|
||||
@ -940,7 +940,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
snap->set_tooltip_text(TTR("Enable snap and show grid."));
|
||||
snap->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_snap_toggled));
|
||||
snap->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_snap_toggled));
|
||||
|
||||
snap_x = memnew(SpinBox);
|
||||
top_hb->add_child(snap_x);
|
||||
@ -989,7 +989,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
open_editor = memnew(Button);
|
||||
edit_hb->add_child(open_editor);
|
||||
open_editor->set_text(TTR("Open Editor"));
|
||||
open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_open_editor), CONNECT_DEFERRED);
|
||||
open_editor->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_open_editor), CONNECT_DEFERRED);
|
||||
edit_hb->hide();
|
||||
open_editor->hide();
|
||||
|
||||
|
@ -177,7 +177,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
delete_button->set_flat(true);
|
||||
delete_button->set_focus_mode(FOCUS_NONE);
|
||||
delete_button->set_icon(get_editor_theme_icon(SNAME("Close")));
|
||||
delete_button->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_node_request).bind(E), CONNECT_DEFERRED);
|
||||
delete_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_node_request).bind(E), CONNECT_DEFERRED);
|
||||
node->get_titlebar_hbox()->add_child(delete_button);
|
||||
}
|
||||
}
|
||||
@ -216,7 +216,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
open_in_editor->set_text(TTR("Open Editor"));
|
||||
open_in_editor->set_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
node->add_child(open_in_editor);
|
||||
open_in_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor).bind(E), CONNECT_DEFERRED);
|
||||
open_in_editor->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor).bind(E), CONNECT_DEFERRED);
|
||||
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
}
|
||||
inspect_filters->set_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
|
||||
node->add_child(inspect_filters);
|
||||
inspect_filters->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_inspect_filters).bind(E), CONNECT_DEFERRED);
|
||||
inspect_filters->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_inspect_filters).bind(E), CONNECT_DEFERRED);
|
||||
inspect_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
|
||||
}
|
||||
|
||||
@ -1232,22 +1232,22 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
|
||||
|
||||
filter_enabled = memnew(CheckBox);
|
||||
filter_enabled->set_text(TTR("Enable Filtering"));
|
||||
filter_enabled->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_toggled));
|
||||
filter_enabled->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_toggled));
|
||||
filter_hbox->add_child(filter_enabled);
|
||||
|
||||
filter_fill_selection = memnew(Button);
|
||||
filter_fill_selection->set_text(TTR("Fill Selected Children"));
|
||||
filter_fill_selection->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_fill_selection));
|
||||
filter_fill_selection->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_fill_selection));
|
||||
filter_hbox->add_child(filter_fill_selection);
|
||||
|
||||
filter_invert_selection = memnew(Button);
|
||||
filter_invert_selection->set_text(TTR("Invert"));
|
||||
filter_invert_selection->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_invert_selection));
|
||||
filter_invert_selection->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_invert_selection));
|
||||
filter_hbox->add_child(filter_invert_selection);
|
||||
|
||||
filter_clear_selection = memnew(Button);
|
||||
filter_clear_selection->set_text(TTR("Clear"));
|
||||
filter_clear_selection->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_clear_selection));
|
||||
filter_clear_selection->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_clear_selection));
|
||||
filter_hbox->add_child(filter_clear_selection);
|
||||
|
||||
filters = memnew(Tree);
|
||||
|
@ -29,6 +29,7 @@
|
||||
/**************************************************************************/
|
||||
|
||||
#include "animation_library_editor.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
@ -811,11 +812,11 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
||||
hb->add_spacer(true);
|
||||
new_library_button = memnew(Button(TTR("New Library")));
|
||||
new_library_button->set_tooltip_text(TTR("Create new empty animation library."));
|
||||
new_library_button->connect("pressed", callable_mp(this, &AnimationLibraryEditor::_add_library));
|
||||
new_library_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationLibraryEditor::_add_library));
|
||||
hb->add_child(new_library_button);
|
||||
load_library_button = memnew(Button(TTR("Load Library")));
|
||||
load_library_button->set_tooltip_text(TTR("Load animation library from disk."));
|
||||
load_library_button->connect("pressed", callable_mp(this, &AnimationLibraryEditor::_load_library));
|
||||
load_library_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationLibraryEditor::_load_library));
|
||||
hb->add_child(load_library_button);
|
||||
vb->add_child(hb);
|
||||
tree = memnew(Tree);
|
||||
|
@ -1987,7 +1987,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
onion_toggle->set_theme_type_variation("FlatButton");
|
||||
onion_toggle->set_toggle_mode(true);
|
||||
onion_toggle->set_tooltip_text(TTR("Enable Onion Skinning"));
|
||||
onion_toggle->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
|
||||
onion_toggle->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
|
||||
hb->add_child(onion_toggle);
|
||||
|
||||
onion_skinning = memnew(MenuButton);
|
||||
@ -2018,7 +2018,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip_text(TTR("Pin AnimationPlayer"));
|
||||
hb->add_child(pin);
|
||||
pin->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_pin_pressed));
|
||||
pin->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_pin_pressed));
|
||||
|
||||
file = memnew(EditorFileDialog);
|
||||
add_child(file);
|
||||
@ -2074,13 +2074,13 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
blend_editor.next->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
blend_vb->add_margin_child(TTR("Next (Auto Queue):"), blend_editor.next);
|
||||
|
||||
autoplay->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_autoplay_pressed));
|
||||
autoplay->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_autoplay_pressed));
|
||||
autoplay->set_toggle_mode(true);
|
||||
play->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_play_pressed));
|
||||
play_from->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_play_from_pressed));
|
||||
play_bw->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_play_bw_pressed));
|
||||
play_bw_from->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_play_bw_from_pressed));
|
||||
stop->connect(SNAME("pressed"), callable_mp(this, &AnimationPlayerEditor::_stop_pressed));
|
||||
play->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_play_pressed));
|
||||
play_from->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_play_from_pressed));
|
||||
play_bw->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_play_bw_pressed));
|
||||
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));
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_select->set_button_group(bg);
|
||||
tool_select->set_pressed(true);
|
||||
tool_select->set_tooltip_text(TTR("Select and move nodes.\nRMB: Add node at position clicked.\nShift+LMB+Drag: Connects the selected node with another node or creates a new node if you select an area without nodes."));
|
||||
tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
@ -1681,7 +1681,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
tool_create->set_tooltip_text(TTR("Create new nodes."));
|
||||
tool_create->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_connect = memnew(Button);
|
||||
tool_connect->set_theme_type_variation("FlatButton");
|
||||
@ -1689,7 +1689,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_connect->set_toggle_mode(true);
|
||||
tool_connect->set_button_group(bg);
|
||||
tool_connect->set_tooltip_text(TTR("Connect nodes."));
|
||||
tool_connect->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
tool_connect->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
// Context-sensitive selection tools:
|
||||
selection_tools_hb = memnew(HBoxContainer);
|
||||
@ -1699,7 +1699,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_erase = memnew(Button);
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
tool_erase->set_tooltip_text(TTR("Remove selected node or transition."));
|
||||
tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected).bind(false));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected).bind(false));
|
||||
tool_erase->set_disabled(true);
|
||||
selection_tools_hb->add_child(tool_erase);
|
||||
|
||||
@ -1815,10 +1815,10 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
|
||||
Button *ok = delete_window->get_cancel_button();
|
||||
ok->set_text(TTR("Delete Selected"));
|
||||
ok->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_selected));
|
||||
ok->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_delete_selected));
|
||||
|
||||
Button *delete_all = delete_window->add_button(TTR("Delete All"), true);
|
||||
delete_all->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_all));
|
||||
delete_all->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_delete_all));
|
||||
}
|
||||
|
||||
void EditorAnimationMultiTransitionEdit::add_transition(const StringName &p_from, const StringName &p_to, Ref<AnimationNodeStateMachineTransition> p_transition) {
|
||||
|
@ -100,7 +100,7 @@ void AnimationTreeEditor::_update_path() {
|
||||
b->set_button_group(group);
|
||||
b->set_pressed(true);
|
||||
b->set_focus_mode(FOCUS_NONE);
|
||||
b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(-1));
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(-1));
|
||||
path_hb->add_child(b);
|
||||
for (int i = 0; i < button_path.size(); i++) {
|
||||
b = memnew(Button);
|
||||
@ -111,7 +111,7 @@ void AnimationTreeEditor::_update_path() {
|
||||
path_hb->add_child(b);
|
||||
b->set_pressed(true);
|
||||
b->set_focus_mode(FOCUS_NONE);
|
||||
b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(i));
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,10 +165,10 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
||||
if (p_clickable) {
|
||||
author->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
|
||||
icon->set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||
icon->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
|
||||
title->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
|
||||
category->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_category_clicked));
|
||||
author->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_author_clicked));
|
||||
icon->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
|
||||
title->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
|
||||
category->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_category_clicked));
|
||||
author->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_author_clicked));
|
||||
} else {
|
||||
title->set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
category->set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
@ -303,7 +303,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
|
||||
new_preview.button = memnew(Button);
|
||||
new_preview.button->set_icon(previews->get_editor_theme_icon(SNAME("ThumbnailWait")));
|
||||
new_preview.button->set_toggle_mode(true);
|
||||
new_preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
|
||||
new_preview.button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
|
||||
preview_hb->add_child(new_preview.button);
|
||||
if (!p_video) {
|
||||
new_preview.image = previews->get_editor_theme_icon(SNAME("ThumbnailWait"));
|
||||
@ -577,7 +577,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
|
||||
title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
dismiss_button = memnew(TextureButton);
|
||||
dismiss_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
|
||||
dismiss_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::_close));
|
||||
title_hb->add_child(dismiss_button);
|
||||
|
||||
title->set_clip_text(true);
|
||||
@ -597,11 +597,11 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
|
||||
install_button = memnew(Button);
|
||||
install_button->set_text(TTR("Install..."));
|
||||
install_button->set_disabled(true);
|
||||
install_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::install));
|
||||
install_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::install));
|
||||
|
||||
retry_button = memnew(Button);
|
||||
retry_button->set_text(TTR("Retry"));
|
||||
retry_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
|
||||
retry_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
|
||||
// Only show the Retry button in case of a failure.
|
||||
retry_button->hide();
|
||||
|
||||
@ -1134,7 +1134,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
||||
first->set_text(TTR("First", "Pagination"));
|
||||
first->set_theme_type_variation("PanelBackgroundButton");
|
||||
if (p_page != 0) {
|
||||
first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(0));
|
||||
first->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(0));
|
||||
} else {
|
||||
first->set_disabled(true);
|
||||
first->set_focus_mode(Control::FOCUS_NONE);
|
||||
@ -1145,7 +1145,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
||||
prev->set_text(TTR("Previous", "Pagination"));
|
||||
prev->set_theme_type_variation("PanelBackgroundButton");
|
||||
if (p_page > 0) {
|
||||
prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page - 1));
|
||||
prev->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page - 1));
|
||||
} else {
|
||||
prev->set_disabled(true);
|
||||
prev->set_focus_mode(Control::FOCUS_NONE);
|
||||
@ -1162,7 +1162,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
||||
current->set_disabled(true);
|
||||
current->set_focus_mode(Control::FOCUS_NONE);
|
||||
} else {
|
||||
current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(i));
|
||||
current->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(i));
|
||||
}
|
||||
hbc->add_child(current);
|
||||
}
|
||||
@ -1171,7 +1171,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
||||
next->set_text(TTR("Next", "Pagination"));
|
||||
next->set_theme_type_variation("PanelBackgroundButton");
|
||||
if (p_page < p_page_count - 1) {
|
||||
next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page + 1));
|
||||
next->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page + 1));
|
||||
} else {
|
||||
next->set_disabled(true);
|
||||
next->set_focus_mode(Control::FOCUS_NONE);
|
||||
@ -1183,7 +1183,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
||||
last->set_text(TTR("Last", "Pagination"));
|
||||
last->set_theme_type_variation("PanelBackgroundButton");
|
||||
if (p_page != p_page_count - 1) {
|
||||
last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page_count - 1));
|
||||
last->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page_count - 1));
|
||||
} else {
|
||||
last->set_disabled(true);
|
||||
last->set_focus_mode(Control::FOCUS_NONE);
|
||||
@ -1542,7 +1542,7 @@ void EditorAssetLibrary::_set_library_message(const String &p_message) {
|
||||
library_message->set_text(p_message);
|
||||
|
||||
if (library_message_action.is_valid()) {
|
||||
library_message_button->disconnect("pressed", library_message_action);
|
||||
library_message_button->disconnect(SceneStringName(pressed), library_message_action);
|
||||
library_message_action = Callable();
|
||||
}
|
||||
library_message_button->hide();
|
||||
@ -1555,11 +1555,11 @@ void EditorAssetLibrary::_set_library_message_with_action(const String &p_messag
|
||||
|
||||
library_message_button->set_text(p_action_text);
|
||||
if (library_message_action.is_valid()) {
|
||||
library_message_button->disconnect("pressed", library_message_action);
|
||||
library_message_button->disconnect(SceneStringName(pressed), library_message_action);
|
||||
library_message_action = Callable();
|
||||
}
|
||||
library_message_action = p_action;
|
||||
library_message_button->connect("pressed", library_message_action);
|
||||
library_message_button->connect(SceneStringName(pressed), library_message_action);
|
||||
library_message_button->show();
|
||||
|
||||
library_message_box->show();
|
||||
@ -1618,12 +1618,12 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
||||
Button *open_asset = memnew(Button);
|
||||
open_asset->set_text(TTR("Import..."));
|
||||
search_hb->add_child(open_asset);
|
||||
open_asset->connect("pressed", callable_mp(this, &EditorAssetLibrary::_asset_open));
|
||||
open_asset->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_asset_open));
|
||||
|
||||
Button *plugins = memnew(Button);
|
||||
plugins->set_text(TTR("Plugins..."));
|
||||
search_hb->add_child(plugins);
|
||||
plugins->connect("pressed", callable_mp(this, &EditorAssetLibrary::_manage_plugins));
|
||||
plugins->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_manage_plugins));
|
||||
|
||||
if (p_templates_only) {
|
||||
open_asset->hide();
|
||||
|
@ -244,14 +244,14 @@ AudioStreamEditor::AudioStreamEditor() {
|
||||
hbox->add_child(_play_button);
|
||||
_play_button->set_flat(true);
|
||||
_play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_play_button->connect(SNAME("pressed"), callable_mp(this, &AudioStreamEditor::_play));
|
||||
_play_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamEditor::_play));
|
||||
_play_button->set_shortcut(ED_SHORTCUT("audio_stream_editor/audio_preview_play_pause", TTR("Audio Preview Play/Pause"), Key::SPACE));
|
||||
|
||||
_stop_button = memnew(Button);
|
||||
hbox->add_child(_stop_button);
|
||||
_stop_button->set_flat(true);
|
||||
_stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_stop_button->connect(SNAME("pressed"), callable_mp(this, &AudioStreamEditor::_stop));
|
||||
_stop_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamEditor::_stop));
|
||||
|
||||
_current_label = memnew(Label);
|
||||
_current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
|
@ -120,7 +120,7 @@ void BoneMapperItem::create_editor() {
|
||||
|
||||
picker_button = memnew(Button);
|
||||
picker_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
|
||||
picker_button->connect("pressed", callable_mp(this, &BoneMapperItem::_open_picker));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(this, &BoneMapperItem::_open_picker));
|
||||
hbox->add_child(picker_button);
|
||||
|
||||
add_child(memnew(HSeparator));
|
||||
@ -301,7 +301,7 @@ void BoneMapper::create_editor() {
|
||||
clear_mapping_button = memnew(Button);
|
||||
clear_mapping_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
clear_mapping_button->set_tooltip_text(TTR("Clear mappings in current group."));
|
||||
clear_mapping_button->connect("pressed", callable_mp(this, &BoneMapper::_clear_mapping_current_group));
|
||||
clear_mapping_button->connect(SceneStringName(pressed), callable_mp(this, &BoneMapper::_clear_mapping_current_group));
|
||||
group_hbox->add_child(clear_mapping_button);
|
||||
|
||||
bone_mapper_field = memnew(AspectRatioContainer);
|
||||
@ -422,7 +422,7 @@ void BoneMapper::recreate_editor() {
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (profile->get_group(i) == profile->get_group_name(current_group_idx)) {
|
||||
BoneMapperButton *mb = memnew(BoneMapperButton(profile->get_bone_name(i), profile->is_required(i), current_bone_idx == i));
|
||||
mb->connect("pressed", callable_mp(this, &BoneMapper::set_current_bone_idx).bind(i), CONNECT_DEFERRED);
|
||||
mb->connect(SceneStringName(pressed), callable_mp(this, &BoneMapper::set_current_bone_idx).bind(i), CONNECT_DEFERRED);
|
||||
mb->set_h_grow_direction(GROW_DIRECTION_BOTH);
|
||||
mb->set_v_grow_direction(GROW_DIRECTION_BOTH);
|
||||
Vector2 vc = profile->get_handle_offset(i);
|
||||
|
@ -76,7 +76,7 @@ Camera3DEditor::Camera3DEditor() {
|
||||
preview->set_offset(SIDE_RIGHT, 0);
|
||||
preview->set_offset(SIDE_TOP, 0);
|
||||
preview->set_offset(SIDE_BOTTOM, 10);
|
||||
preview->connect("pressed", callable_mp(this, &Camera3DEditor::_pressed));
|
||||
preview->connect(SceneStringName(pressed), callable_mp(this, &Camera3DEditor::_pressed));
|
||||
}
|
||||
|
||||
void Camera3DEditorPlugin::edit(Object *p_object) {
|
||||
|
@ -5251,7 +5251,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
controls_hb->add_child(button_center_view);
|
||||
button_center_view->set_flat(true);
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(VIEW_CENTER_TO_SELECTION));
|
||||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(VIEW_CENTER_TO_SELECTION));
|
||||
|
||||
zoom_widget = memnew(EditorZoomWidget);
|
||||
zoom_widget->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE);
|
||||
@ -5288,7 +5288,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
select_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(select_button);
|
||||
select_button->set_toggle_mode(true);
|
||||
select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SELECT));
|
||||
select_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SELECT));
|
||||
select_button->set_pressed(true);
|
||||
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), Key::Q));
|
||||
select_button->set_shortcut_context(this);
|
||||
@ -5300,7 +5300,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
move_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(move_button);
|
||||
move_button->set_toggle_mode(true);
|
||||
move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_MOVE));
|
||||
move_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_MOVE));
|
||||
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), Key::W));
|
||||
move_button->set_shortcut_context(this);
|
||||
move_button->set_tooltip_text(TTR("Move Mode"));
|
||||
@ -5309,7 +5309,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
rotate_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(rotate_button);
|
||||
rotate_button->set_toggle_mode(true);
|
||||
rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_ROTATE));
|
||||
rotate_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_ROTATE));
|
||||
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), Key::E));
|
||||
rotate_button->set_shortcut_context(this);
|
||||
rotate_button->set_tooltip_text(TTR("Rotate Mode"));
|
||||
@ -5318,7 +5318,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
scale_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(scale_button);
|
||||
scale_button->set_toggle_mode(true);
|
||||
scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SCALE));
|
||||
scale_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SCALE));
|
||||
scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), Key::S));
|
||||
scale_button->set_shortcut_context(this);
|
||||
scale_button->set_tooltip_text(TTR("Shift: Scale proportionally."));
|
||||
@ -5329,21 +5329,21 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
list_select_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(list_select_button);
|
||||
list_select_button->set_toggle_mode(true);
|
||||
list_select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_LIST_SELECT));
|
||||
list_select_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_LIST_SELECT));
|
||||
list_select_button->set_tooltip_text(TTR("Show list of selectable nodes at position clicked."));
|
||||
|
||||
pivot_button = memnew(Button);
|
||||
pivot_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(pivot_button);
|
||||
pivot_button->set_toggle_mode(true);
|
||||
pivot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_EDIT_PIVOT));
|
||||
pivot_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_EDIT_PIVOT));
|
||||
pivot_button->set_tooltip_text(TTR("Click to change object's rotation pivot.") + "\n" + TTR("Shift: Set temporary rotation pivot.") + "\n" + TTR("Click this button while holding Shift to put the rotation pivot in the center of the selected nodes."));
|
||||
|
||||
pan_button = memnew(Button);
|
||||
pan_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(pan_button);
|
||||
pan_button->set_toggle_mode(true);
|
||||
pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_PAN));
|
||||
pan_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_PAN));
|
||||
pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), Key::G));
|
||||
pan_button->set_shortcut_context(this);
|
||||
pan_button->set_tooltip_text(TTR("You can also use Pan View shortcut (Space by default) to pan in any mode."));
|
||||
@ -5352,7 +5352,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
ruler_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(ruler_button);
|
||||
ruler_button->set_toggle_mode(true);
|
||||
ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_RULER));
|
||||
ruler_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_RULER));
|
||||
ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), Key::R));
|
||||
ruler_button->set_shortcut_context(this);
|
||||
ruler_button->set_tooltip_text(TTR("Ruler Mode"));
|
||||
@ -5414,7 +5414,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
lock_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(lock_button);
|
||||
|
||||
lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(LOCK_SELECTED));
|
||||
lock_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(LOCK_SELECTED));
|
||||
lock_button->set_tooltip_text(TTR("Lock selected node, preventing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
lock_button->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | Key::L));
|
||||
@ -5422,7 +5422,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
unlock_button = memnew(Button);
|
||||
unlock_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(unlock_button);
|
||||
unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNLOCK_SELECTED));
|
||||
unlock_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNLOCK_SELECTED));
|
||||
unlock_button->set_tooltip_text(TTR("Unlock selected node, allowing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
unlock_button->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::L));
|
||||
@ -5430,7 +5430,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
group_button = memnew(Button);
|
||||
group_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(group_button);
|
||||
group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(GROUP_SELECTED));
|
||||
group_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(GROUP_SELECTED));
|
||||
group_button->set_tooltip_text(TTR("Groups the selected node with its children. This causes the parent to be selected when any child node is clicked in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | Key::G));
|
||||
@ -5438,7 +5438,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
ungroup_button = memnew(Button);
|
||||
ungroup_button->set_theme_type_variation("FlatButton");
|
||||
main_menu_hbox->add_child(ungroup_button);
|
||||
ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNGROUP_SELECTED));
|
||||
ungroup_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNGROUP_SELECTED));
|
||||
ungroup_button->set_tooltip_text(TTR("Ungroups the selected node from its children. Child nodes will be individual items in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::G));
|
||||
@ -5550,7 +5550,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
key_loc_button->set_toggle_mode(true);
|
||||
key_loc_button->set_pressed(true);
|
||||
key_loc_button->set_focus_mode(FOCUS_NONE);
|
||||
key_loc_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_POS));
|
||||
key_loc_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_POS));
|
||||
key_loc_button->set_tooltip_text(TTR("Translation mask for inserting keys."));
|
||||
animation_hb->add_child(key_loc_button);
|
||||
|
||||
@ -5559,7 +5559,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
key_rot_button->set_toggle_mode(true);
|
||||
key_rot_button->set_pressed(true);
|
||||
key_rot_button->set_focus_mode(FOCUS_NONE);
|
||||
key_rot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_ROT));
|
||||
key_rot_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_ROT));
|
||||
key_rot_button->set_tooltip_text(TTR("Rotation mask for inserting keys."));
|
||||
animation_hb->add_child(key_rot_button);
|
||||
|
||||
@ -5567,14 +5567,14 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
key_scale_button->set_theme_type_variation("FlatButton");
|
||||
key_scale_button->set_toggle_mode(true);
|
||||
key_scale_button->set_focus_mode(FOCUS_NONE);
|
||||
key_scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_SCALE));
|
||||
key_scale_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_SCALE));
|
||||
key_scale_button->set_tooltip_text(TTR("Scale mask for inserting keys."));
|
||||
animation_hb->add_child(key_scale_button);
|
||||
|
||||
key_insert_button = memnew(Button);
|
||||
key_insert_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_KEY));
|
||||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_KEY));
|
||||
key_insert_button->set_tooltip_text(TTR("Insert keys (based on mask)."));
|
||||
key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), Key::INSERT));
|
||||
key_insert_button->set_shortcut_context(this);
|
||||
|
@ -352,7 +352,7 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert
|
||||
cb->set_text(text_split[0]);
|
||||
cb->set_clip_text(true);
|
||||
cb->set_meta("_value", current_val);
|
||||
cb->connect("pressed", callable_mp(this, &EditorPropertySizeFlags::_flag_toggled));
|
||||
cb->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertySizeFlags::_flag_toggled));
|
||||
add_focusable(cb);
|
||||
|
||||
flag_options->add_child(cb);
|
||||
@ -407,7 +407,7 @@ EditorPropertySizeFlags::EditorPropertySizeFlags() {
|
||||
flag_expand->set_text(TTR("Expand"));
|
||||
vb->add_child(flag_expand);
|
||||
add_focusable(flag_expand);
|
||||
flag_expand->connect("pressed", callable_mp(this, &EditorPropertySizeFlags::_expand_toggled));
|
||||
flag_expand->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertySizeFlags::_expand_toggled));
|
||||
}
|
||||
|
||||
bool EditorInspectorPluginControl::can_handle(Object *p_object) {
|
||||
@ -552,7 +552,7 @@ void ControlEditorPresetPicker::_add_row_button(HBoxContainer *p_row, const int
|
||||
b->set_tooltip_text(p_name);
|
||||
b->set_flat(true);
|
||||
p_row->add_child(b);
|
||||
b->connect("pressed", callable_mp(this, &ControlEditorPresetPicker::_preset_button_pressed).bind(p_preset));
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &ControlEditorPresetPicker::_preset_button_pressed).bind(p_preset));
|
||||
|
||||
preset_buttons[p_preset] = b;
|
||||
}
|
||||
@ -731,7 +731,7 @@ SizeFlagPresetPicker::SizeFlagPresetPicker(bool p_vertical) {
|
||||
expand_button->set_flat(true);
|
||||
expand_button->set_text(TTR("Expand"));
|
||||
expand_button->set_tooltip_text(TTR("Enable to also set the Expand flag.\nDisable to only set Shrink/Fill flags."));
|
||||
expand_button->connect("pressed", callable_mp(this, &SizeFlagPresetPicker::_expand_button_pressed));
|
||||
expand_button->connect(SceneStringName(pressed), callable_mp(this, &SizeFlagPresetPicker::_expand_button_pressed));
|
||||
main_vb->add_child(expand_button);
|
||||
}
|
||||
|
||||
@ -1077,7 +1077,7 @@ ControlEditorToolbar::ControlEditorToolbar() {
|
||||
keep_ratio_button->set_text(TTR("Set to Current Ratio"));
|
||||
keep_ratio_button->set_tooltip_text(TTR("Adjust anchors and offsets to match the current rect size."));
|
||||
anchors_button->get_popup_hbox()->add_child(keep_ratio_button);
|
||||
keep_ratio_button->connect("pressed", callable_mp(this, &ControlEditorToolbar::_anchors_to_current_ratio));
|
||||
keep_ratio_button->connect(SceneStringName(pressed), callable_mp(this, &ControlEditorToolbar::_anchors_to_current_ratio));
|
||||
|
||||
anchor_mode_button = memnew(Button);
|
||||
anchor_mode_button->set_theme_type_variation("FlatButton");
|
||||
|
@ -215,7 +215,7 @@ EditorPluginSettings::EditorPluginSettings() {
|
||||
title_hb->add_child(label);
|
||||
title_hb->add_spacer();
|
||||
Button *create_plugin_button = memnew(Button(TTR("Create New Plugin")));
|
||||
create_plugin_button->connect("pressed", callable_mp(this, &EditorPluginSettings::_create_clicked));
|
||||
create_plugin_button->connect(SceneStringName(pressed), callable_mp(this, &EditorPluginSettings::_create_clicked));
|
||||
title_hb->add_child(create_plugin_button);
|
||||
add_child(title_hb);
|
||||
|
||||
|
@ -305,7 +305,7 @@ void EditorPropertyFontMetaOverride::update_property() {
|
||||
Button *remove = memnew(Button);
|
||||
remove->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
hbox->add_child(remove);
|
||||
remove->connect("pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_remove).bind(remove, name));
|
||||
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_remove).bind(remove, name));
|
||||
|
||||
prop->update_property();
|
||||
}
|
||||
@ -316,7 +316,7 @@ void EditorPropertyFontMetaOverride::update_property() {
|
||||
} else {
|
||||
button_add = EditorInspector::create_inspector_action_button(TTR("Add Locale"));
|
||||
}
|
||||
button_add->connect("pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_add_menu));
|
||||
button_add->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_add_menu));
|
||||
property_vbox->add_child(button_add);
|
||||
|
||||
updating = false;
|
||||
@ -359,7 +359,7 @@ EditorPropertyFontMetaOverride::EditorPropertyFontMetaOverride(bool p_script) {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
@ -530,7 +530,7 @@ EditorPropertyOTVariation::EditorPropertyOTVariation() {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyOTVariation::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTVariation::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
@ -784,7 +784,7 @@ void EditorPropertyOTFeatures::update_property() {
|
||||
Button *remove = memnew(Button);
|
||||
remove->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
hbox->add_child(remove);
|
||||
remove->connect("pressed", callable_mp(this, &EditorPropertyOTFeatures::_remove).bind(remove, name_tag));
|
||||
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_remove).bind(remove, name_tag));
|
||||
|
||||
prop->update_property();
|
||||
}
|
||||
@ -792,7 +792,7 @@ void EditorPropertyOTFeatures::update_property() {
|
||||
|
||||
button_add = EditorInspector::create_inspector_action_button(TTR("Add Feature"));
|
||||
button_add->set_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
button_add->connect("pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_menu));
|
||||
button_add->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_menu));
|
||||
property_vbox->add_child(button_add);
|
||||
|
||||
updating = false;
|
||||
@ -833,7 +833,7 @@ EditorPropertyOTFeatures::EditorPropertyOTFeatures() {
|
||||
edit = memnew(Button);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect("pressed", callable_mp(this, &EditorPropertyOTFeatures::_edit_pressed));
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_edit_pressed));
|
||||
edit->set_toggle_mode(true);
|
||||
add_child(edit);
|
||||
add_focusable(edit);
|
||||
|
@ -186,7 +186,7 @@ GPUParticlesCollisionSDF3DEditorPlugin::GPUParticlesCollisionSDF3DEditorPlugin()
|
||||
bake->set_theme_type_variation("FlatButton");
|
||||
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
bake->set_text(TTR("Bake SDF"));
|
||||
bake->connect("pressed", callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
|
||||
bake->connect(SceneStringName(pressed), callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
|
||||
bake_hb->add_child(bake);
|
||||
|
||||
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake_hb);
|
||||
|
@ -644,7 +644,7 @@ GradientEditor::GradientEditor() {
|
||||
|
||||
gradient_editor_rect = memnew(GradientEdit);
|
||||
add_child(gradient_editor_rect);
|
||||
reverse_button->connect("pressed", callable_mp(gradient_editor_rect, &GradientEdit::reverse_gradient));
|
||||
reverse_button->connect(SceneStringName(pressed), callable_mp(gradient_editor_rect, &GradientEdit::reverse_gradient));
|
||||
|
||||
set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
_set_snap_enabled(snap_button->is_pressed());
|
||||
|
@ -282,7 +282,7 @@ GradientTexture2DEditor::GradientTexture2DEditor() {
|
||||
reverse_button = memnew(Button);
|
||||
reverse_button->set_tooltip_text(TTR("Swap Gradient Fill Points"));
|
||||
toolbar->add_child(reverse_button);
|
||||
reverse_button->connect("pressed", callable_mp(this, &GradientTexture2DEditor::_reverse_button_pressed));
|
||||
reverse_button->connect(SceneStringName(pressed), callable_mp(this, &GradientTexture2DEditor::_reverse_button_pressed));
|
||||
|
||||
toolbar->add_child(memnew(VSeparator));
|
||||
|
||||
|
@ -88,7 +88,7 @@ InputEventConfigContainer::InputEventConfigContainer() {
|
||||
add_child(input_event_text);
|
||||
|
||||
open_config_button = EditorInspector::create_inspector_action_button(TTR("Configure"));
|
||||
open_config_button->connect("pressed", callable_mp(this, &InputEventConfigContainer::_configure_pressed));
|
||||
open_config_button->connect(SceneStringName(pressed), callable_mp(this, &InputEventConfigContainer::_configure_pressed));
|
||||
add_child(open_config_button);
|
||||
|
||||
add_child(memnew(Control));
|
||||
|
@ -177,7 +177,7 @@ LightmapGIEditorPlugin::LightmapGIEditorPlugin() {
|
||||
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
bake->set_text(TTR("Bake Lightmaps"));
|
||||
bake->hide();
|
||||
bake->connect("pressed", Callable(this, "_bake"));
|
||||
bake->connect(SceneStringName(pressed), Callable(this, "_bake"));
|
||||
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake);
|
||||
lightmap = nullptr;
|
||||
|
||||
|
@ -242,14 +242,14 @@ MaterialEditor::MaterialEditor() {
|
||||
sphere_switch->set_toggle_mode(true);
|
||||
sphere_switch->set_pressed(true);
|
||||
vb_shape->add_child(sphere_switch);
|
||||
sphere_switch->connect("pressed", callable_mp(this, &MaterialEditor::_on_sphere_switch_pressed));
|
||||
sphere_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_sphere_switch_pressed));
|
||||
|
||||
box_switch = memnew(Button);
|
||||
box_switch->set_theme_type_variation("PreviewLightButton");
|
||||
box_switch->set_toggle_mode(true);
|
||||
box_switch->set_pressed(false);
|
||||
vb_shape->add_child(box_switch);
|
||||
box_switch->connect("pressed", callable_mp(this, &MaterialEditor::_on_box_switch_pressed));
|
||||
box_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_box_switch_pressed));
|
||||
|
||||
layout_3d->add_spacer();
|
||||
|
||||
@ -261,14 +261,14 @@ MaterialEditor::MaterialEditor() {
|
||||
light_1_switch->set_toggle_mode(true);
|
||||
light_1_switch->set_pressed(true);
|
||||
vb_light->add_child(light_1_switch);
|
||||
light_1_switch->connect("pressed", callable_mp(this, &MaterialEditor::_on_light_1_switch_pressed));
|
||||
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_light_1_switch_pressed));
|
||||
|
||||
light_2_switch = memnew(Button);
|
||||
light_2_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_2_switch->set_toggle_mode(true);
|
||||
light_2_switch->set_pressed(true);
|
||||
vb_light->add_child(light_2_switch);
|
||||
light_2_switch->connect("pressed", callable_mp(this, &MaterialEditor::_on_light_2_switch_pressed));
|
||||
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_light_2_switch_pressed));
|
||||
|
||||
if (EditorSettings::get_singleton()->get_project_metadata("inspector_options", "material_preview_on_sphere", true)) {
|
||||
box_instance->hide();
|
||||
|
@ -150,14 +150,14 @@ MeshEditor::MeshEditor() {
|
||||
light_1_switch->set_toggle_mode(true);
|
||||
light_1_switch->set_pressed(true);
|
||||
vb_light->add_child(light_1_switch);
|
||||
light_1_switch->connect("pressed", callable_mp(this, &MeshEditor::_on_light_1_switch_pressed));
|
||||
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &MeshEditor::_on_light_1_switch_pressed));
|
||||
|
||||
light_2_switch = memnew(Button);
|
||||
light_2_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_2_switch->set_toggle_mode(true);
|
||||
light_2_switch->set_pressed(true);
|
||||
vb_light->add_child(light_2_switch);
|
||||
light_2_switch->connect("pressed", callable_mp(this, &MeshEditor::_on_light_2_switch_pressed));
|
||||
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &MeshEditor::_on_light_2_switch_pressed));
|
||||
|
||||
rot_x = 0;
|
||||
rot_y = 0;
|
||||
|
@ -276,12 +276,12 @@ MeshLibraryEditor::MeshLibraryEditor() {
|
||||
|
||||
cd_remove = memnew(ConfirmationDialog);
|
||||
add_child(cd_remove);
|
||||
cd_remove->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_remove_confirm));
|
||||
cd_remove->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &MeshLibraryEditor::_menu_remove_confirm));
|
||||
cd_update = memnew(ConfirmationDialog);
|
||||
add_child(cd_update);
|
||||
cd_update->set_ok_button_text(TTR("Apply without Transforms"));
|
||||
cd_update->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(false));
|
||||
cd_update->add_button(TTR("Apply with Transforms"))->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(true));
|
||||
cd_update->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(false));
|
||||
cd_update->add_button(TTR("Apply with Transforms"))->connect(SceneStringName(pressed), callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(true));
|
||||
}
|
||||
|
||||
void MeshLibraryEditorPlugin::edit(Object *p_node) {
|
||||
|
@ -296,7 +296,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
||||
Button *b = memnew(Button);
|
||||
hbc->add_child(b);
|
||||
b->set_text("..");
|
||||
b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse).bind(false));
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(false));
|
||||
|
||||
vbc->add_margin_child(TTR("Target Surface:"), hbc);
|
||||
|
||||
@ -308,7 +308,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
||||
hbc->add_child(b);
|
||||
b->set_text("..");
|
||||
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
|
||||
b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse).bind(true));
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(true));
|
||||
|
||||
populate_axis = memnew(OptionButton);
|
||||
populate_axis->add_item(TTR("X-Axis"));
|
||||
@ -354,7 +354,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
||||
|
||||
populate_dialog->set_ok_button_text(TTR("Populate"));
|
||||
|
||||
populate_dialog->get_ok_button()->connect("pressed", callable_mp(this, &MultiMeshEditor::_populate));
|
||||
populate_dialog->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_populate));
|
||||
std = memnew(SceneTreeDialog);
|
||||
Vector<StringName> valid_types;
|
||||
valid_types.push_back("MeshInstance3D");
|
||||
|
@ -526,13 +526,13 @@ NavigationObstacle3DEditor::NavigationObstacle3DEditor() {
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
add_child(button_create);
|
||||
button_create->connect("pressed", callable_mp(this, &NavigationObstacle3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
add_child(button_edit);
|
||||
button_edit->connect("pressed", callable_mp(this, &NavigationObstacle3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
||||
mode = MODE_EDIT;
|
||||
|
@ -148,14 +148,14 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
|
||||
button_bake->set_toggle_mode(true);
|
||||
button_bake->set_text(TTR("Bake NavigationPolygon"));
|
||||
button_bake->set_tooltip_text(TTR("Bakes the NavigationPolygon by first parsing the scene for source geometry and then creating the navigation polygon vertices and polygons."));
|
||||
button_bake->connect("pressed", callable_mp(this, &NavigationPolygonEditor::_bake_pressed));
|
||||
button_bake->connect(SceneStringName(pressed), callable_mp(this, &NavigationPolygonEditor::_bake_pressed));
|
||||
|
||||
button_reset = memnew(Button);
|
||||
button_reset->set_flat(true);
|
||||
bake_hbox->add_child(button_reset);
|
||||
button_reset->set_text(TTR("Clear NavigationPolygon"));
|
||||
button_reset->set_tooltip_text(TTR("Clears the internal NavigationPolygon outlines, vertices and polygons."));
|
||||
button_reset->connect("pressed", callable_mp(this, &NavigationPolygonEditor::_clear_pressed));
|
||||
button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationPolygonEditor::_clear_pressed));
|
||||
|
||||
bake_info = memnew(Label);
|
||||
bake_hbox->add_child(bake_info);
|
||||
|
@ -3013,7 +3013,7 @@ void Node3DEditorViewport::_notification(int p_what) {
|
||||
view_menu->begin_bulk_theme_override();
|
||||
view_menu->add_theme_style_override("normal", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->add_theme_style_override("hover", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->add_theme_style_override("pressed", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->add_theme_style_override(SceneStringName(pressed), gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->add_theme_style_override("focus", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->add_theme_style_override("disabled", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
view_menu->end_bulk_theme_override();
|
||||
@ -3021,7 +3021,7 @@ void Node3DEditorViewport::_notification(int p_what) {
|
||||
preview_camera->begin_bulk_theme_override();
|
||||
preview_camera->add_theme_style_override("normal", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->add_theme_style_override("hover", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->add_theme_style_override("pressed", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->add_theme_style_override(SceneStringName(pressed), gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->add_theme_style_override("focus", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->add_theme_style_override("disabled", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles)));
|
||||
preview_camera->end_bulk_theme_override();
|
||||
@ -8360,7 +8360,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_SELECT]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_SELECT]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
|
||||
tool_button[TOOL_MODE_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SELECT));
|
||||
tool_button[TOOL_MODE_SELECT]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SELECT));
|
||||
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), Key::Q));
|
||||
tool_button[TOOL_MODE_SELECT]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_SELECT]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
@ -8371,7 +8371,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_MOVE]->set_theme_type_variation("FlatButton");
|
||||
|
||||
tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_MOVE));
|
||||
tool_button[TOOL_MODE_MOVE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_MOVE));
|
||||
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), Key::W));
|
||||
tool_button[TOOL_MODE_MOVE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_MOVE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
@ -8380,7 +8380,7 @@ Node3DEditor::Node3DEditor() {
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_ROTATE]);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_ROTATE));
|
||||
tool_button[TOOL_MODE_ROTATE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_ROTATE));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), Key::E));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
@ -8389,7 +8389,7 @@ Node3DEditor::Node3DEditor() {
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_SCALE]);
|
||||
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_SCALE]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_SCALE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SCALE));
|
||||
tool_button[TOOL_MODE_SCALE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SCALE));
|
||||
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), Key::R));
|
||||
tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_SCALE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
@ -8400,13 +8400,13 @@ Node3DEditor::Node3DEditor() {
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_LIST_SELECT]);
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_LIST_SELECT));
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_LIST_SELECT));
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip_text(TTR("Show list of selectable nodes at position clicked."));
|
||||
|
||||
tool_button[TOOL_LOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_LOCK_SELECTED]);
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_LOCK_SELECTED));
|
||||
tool_button[TOOL_LOCK_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_LOCK_SELECTED));
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_tooltip_text(TTR("Lock selected node, preventing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | Key::L));
|
||||
@ -8414,7 +8414,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNLOCK_SELECTED));
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNLOCK_SELECTED));
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip_text(TTR("Unlock selected node, allowing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::L));
|
||||
@ -8422,7 +8422,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_GROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_GROUP_SELECTED));
|
||||
tool_button[TOOL_GROUP_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_GROUP_SELECTED));
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_tooltip_text(TTR("Groups the selected node with its children. This selects the parent when any child node is clicked in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | Key::G));
|
||||
@ -8430,7 +8430,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNGROUP_SELECTED));
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNGROUP_SELECTED));
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip_text(TTR("Ungroups the selected node from its children. Child nodes will be individual items in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::G));
|
||||
@ -8468,7 +8468,7 @@ Node3DEditor::Node3DEditor() {
|
||||
sun_button->set_tooltip_text(TTR("Toggle preview sunlight.\nIf a DirectionalLight3D node is added to the scene, preview sunlight is disabled."));
|
||||
sun_button->set_toggle_mode(true);
|
||||
sun_button->set_theme_type_variation("FlatButton");
|
||||
sun_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
sun_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
// Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
|
||||
sun_button->set_pressed(true);
|
||||
|
||||
@ -8478,7 +8478,7 @@ Node3DEditor::Node3DEditor() {
|
||||
environ_button->set_tooltip_text(TTR("Toggle preview environment.\nIf a WorldEnvironment node is added to the scene, preview environment is disabled."));
|
||||
environ_button->set_toggle_mode(true);
|
||||
environ_button->set_theme_type_variation("FlatButton");
|
||||
environ_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
environ_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
// Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
|
||||
environ_button->set_pressed(true);
|
||||
|
||||
@ -8487,7 +8487,7 @@ Node3DEditor::Node3DEditor() {
|
||||
sun_environ_settings = memnew(Button);
|
||||
sun_environ_settings->set_tooltip_text(TTR("Edit Sun and Environment settings."));
|
||||
sun_environ_settings->set_theme_type_variation("FlatButton");
|
||||
sun_environ_settings->connect("pressed", callable_mp(this, &Node3DEditor::_sun_environ_settings_pressed));
|
||||
sun_environ_settings->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_sun_environ_settings_pressed));
|
||||
|
||||
main_menu_hbox->add_child(sun_environ_settings);
|
||||
|
||||
@ -8616,7 +8616,7 @@ Node3DEditor::Node3DEditor() {
|
||||
snap_dialog->set_title(TTR("Snap Settings"));
|
||||
add_child(snap_dialog);
|
||||
snap_dialog->connect("confirmed", callable_mp(this, &Node3DEditor::_snap_changed));
|
||||
snap_dialog->get_cancel_button()->connect("pressed", callable_mp(this, &Node3DEditor::_snap_update));
|
||||
snap_dialog->get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_snap_update));
|
||||
|
||||
VBoxContainer *snap_dialog_vbc = memnew(VBoxContainer);
|
||||
snap_dialog->add_child(snap_dialog_vbc);
|
||||
@ -8852,7 +8852,7 @@ void fragment() {
|
||||
sun_add_to_scene = memnew(Button);
|
||||
sun_add_to_scene->set_text(TTR("Add Sun to Scene"));
|
||||
sun_add_to_scene->set_tooltip_text(TTR("Adds a DirectionalLight3D node matching the preview sun settings to the current scene.\nHold Shift while clicking to also add the preview environment to the current scene."));
|
||||
sun_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_sun_to_scene).bind(false));
|
||||
sun_add_to_scene->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_add_sun_to_scene).bind(false));
|
||||
sun_vb->add_spacer();
|
||||
sun_vb->add_child(sun_add_to_scene);
|
||||
|
||||
@ -8901,29 +8901,29 @@ void fragment() {
|
||||
environ_ao_button = memnew(Button);
|
||||
environ_ao_button->set_text(TTR("AO"));
|
||||
environ_ao_button->set_toggle_mode(true);
|
||||
environ_ao_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
environ_ao_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
fx_vb->add_child(environ_ao_button);
|
||||
environ_glow_button = memnew(Button);
|
||||
environ_glow_button->set_text(TTR("Glow"));
|
||||
environ_glow_button->set_toggle_mode(true);
|
||||
environ_glow_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
environ_glow_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
fx_vb->add_child(environ_glow_button);
|
||||
environ_tonemap_button = memnew(Button);
|
||||
environ_tonemap_button->set_text(TTR("Tonemap"));
|
||||
environ_tonemap_button->set_toggle_mode(true);
|
||||
environ_tonemap_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
environ_tonemap_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
fx_vb->add_child(environ_tonemap_button);
|
||||
environ_gi_button = memnew(Button);
|
||||
environ_gi_button->set_text(TTR("GI"));
|
||||
environ_gi_button->set_toggle_mode(true);
|
||||
environ_gi_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
environ_gi_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
|
||||
fx_vb->add_child(environ_gi_button);
|
||||
environ_vb->add_margin_child(TTR("Post Process"), fx_vb);
|
||||
|
||||
environ_add_to_scene = memnew(Button);
|
||||
environ_add_to_scene->set_text(TTR("Add Environment to Scene"));
|
||||
environ_add_to_scene->set_tooltip_text(TTR("Adds a WorldEnvironment node matching the preview environment settings to the current scene.\nHold Shift while clicking to also add the preview sun to the current scene."));
|
||||
environ_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_environment_to_scene).bind(false));
|
||||
environ_add_to_scene->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_add_environment_to_scene).bind(false));
|
||||
environ_vb->add_spacer();
|
||||
environ_vb->add_child(environ_add_to_scene);
|
||||
|
||||
|
@ -108,7 +108,7 @@ OccluderInstance3DEditorPlugin::OccluderInstance3DEditorPlugin() {
|
||||
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
bake->set_text(TTR("Bake Occluders"));
|
||||
bake->hide();
|
||||
bake->connect("pressed", Callable(this, "_bake"));
|
||||
bake->connect(SceneStringName(pressed), Callable(this, "_bake"));
|
||||
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake);
|
||||
occluder_instance = nullptr;
|
||||
|
||||
|
@ -52,7 +52,7 @@ PackedSceneEditor::PackedSceneEditor(Ref<PackedScene> &p_packed_scene) {
|
||||
packed_scene = p_packed_scene;
|
||||
|
||||
open_scene_button = EditorInspector::create_inspector_action_button(TTR("Open Scene"));
|
||||
open_scene_button->connect(SNAME("pressed"), callable_mp(this, &PackedSceneEditor::_on_open_scene_pressed));
|
||||
open_scene_button->connect(SceneStringName(pressed), callable_mp(this, &PackedSceneEditor::_on_open_scene_pressed));
|
||||
open_scene_button->set_disabled(!packed_scene->get_path().get_file().is_valid_filename());
|
||||
add_child(open_scene_button);
|
||||
|
||||
|
@ -612,7 +612,7 @@ Path2DEditor::Path2DEditor() {
|
||||
curve_edit->set_pressed(true);
|
||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit->set_tooltip_text(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point"));
|
||||
curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT));
|
||||
curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT));
|
||||
add_child(curve_edit);
|
||||
|
||||
curve_edit_curve = memnew(Button);
|
||||
@ -620,7 +620,7 @@ Path2DEditor::Path2DEditor() {
|
||||
curve_edit_curve->set_toggle_mode(true);
|
||||
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit_curve->set_tooltip_text(TTR("Select Control Points (Shift+Drag)"));
|
||||
curve_edit_curve->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT_CURVE));
|
||||
curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT_CURVE));
|
||||
add_child(curve_edit_curve);
|
||||
|
||||
curve_create = memnew(Button);
|
||||
@ -628,7 +628,7 @@ Path2DEditor::Path2DEditor() {
|
||||
curve_create->set_toggle_mode(true);
|
||||
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_create->set_tooltip_text(TTR("Add Point (in empty space)") + "\n" + TTR("Right Click: Delete Point"));
|
||||
curve_create->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CREATE));
|
||||
curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CREATE));
|
||||
add_child(curve_create);
|
||||
|
||||
curve_del = memnew(Button);
|
||||
@ -636,21 +636,21 @@ Path2DEditor::Path2DEditor() {
|
||||
curve_del->set_toggle_mode(true);
|
||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_del->set_tooltip_text(TTR("Delete Point"));
|
||||
curve_del->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_DELETE));
|
||||
curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_DELETE));
|
||||
add_child(curve_del);
|
||||
|
||||
curve_close = memnew(Button);
|
||||
curve_close->set_theme_type_variation("FlatButton");
|
||||
curve_close->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_close->set_tooltip_text(TTR("Close Curve"));
|
||||
curve_close->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLOSE));
|
||||
curve_close->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLOSE));
|
||||
add_child(curve_close);
|
||||
|
||||
curve_clear_points = memnew(Button);
|
||||
curve_clear_points->set_theme_type_variation("FlatButton");
|
||||
curve_clear_points->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_clear_points->set_tooltip_text(TTR("Clear Points"));
|
||||
curve_clear_points->connect("pressed", callable_mp(this, &Path2DEditor::_confirm_clear_points));
|
||||
curve_clear_points->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_confirm_clear_points));
|
||||
add_child(curve_clear_points);
|
||||
|
||||
clear_points_dialog = memnew(ConfirmationDialog);
|
||||
|
@ -465,11 +465,11 @@ Path3DGizmo::Path3DGizmo(Path3D *p_path, float p_disk_size) {
|
||||
// Connecting to a signal once, rather than plaguing the implementation with calls to `Node3DEditor::update_transform_gizmo`.
|
||||
path->connect("curve_changed", callable_mp(this, &Path3DGizmo::_update_transform_gizmo));
|
||||
|
||||
Path3DEditorPlugin::singleton->curve_edit->connect("pressed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_edit_curve->connect("pressed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_create->connect("pressed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_del->connect("pressed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_close->connect("pressed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
Path3DEditorPlugin::singleton->curve_close->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
}
|
||||
|
||||
EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
|
||||
@ -788,12 +788,12 @@ void Path3DEditorPlugin::_update_theme() {
|
||||
void Path3DEditorPlugin::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
curve_create->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_CREATE));
|
||||
curve_edit_curve->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_CURVE));
|
||||
curve_edit_tilt->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_TILT));
|
||||
curve_edit->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT));
|
||||
curve_del->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_DELETE));
|
||||
curve_close->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_close_curve));
|
||||
curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_CREATE));
|
||||
curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_CURVE));
|
||||
curve_edit_tilt->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_TILT));
|
||||
curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT));
|
||||
curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_DELETE));
|
||||
curve_close->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_close_curve));
|
||||
|
||||
_update_theme();
|
||||
} break;
|
||||
@ -875,7 +875,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_clear_points->set_theme_type_variation("FlatButton");
|
||||
curve_clear_points->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_clear_points->set_tooltip_text(TTR("Clear Points"));
|
||||
curve_clear_points->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_confirm_clear_points));
|
||||
curve_clear_points->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_confirm_clear_points));
|
||||
topmenu_bar->add_child(curve_clear_points);
|
||||
|
||||
clear_points_dialog = memnew(ConfirmationDialog);
|
||||
|
@ -161,7 +161,7 @@ void PluginConfigDialog::_notification(int p_what) {
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed));
|
||||
get_cancel_button()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_canceled));
|
||||
get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &PluginConfigDialog::_on_canceled));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ void Polygon2DEditor::_update_bone_list() {
|
||||
cb->set_pressed(true);
|
||||
}
|
||||
|
||||
cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected).bind(i));
|
||||
cb->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_bone_paint_selected).bind(i));
|
||||
}
|
||||
|
||||
uv_edit_draw->queue_redraw();
|
||||
@ -1302,7 +1302,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
button_uv->set_theme_type_variation("FlatButton");
|
||||
add_child(button_uv);
|
||||
button_uv->set_tooltip_text(TTR("Open Polygon 2D UV editor."));
|
||||
button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
|
||||
button_uv->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
|
||||
|
||||
uv_mode = UV_MODE_EDIT_POINT;
|
||||
uv_edit = memnew(AcceptDialog);
|
||||
@ -1341,10 +1341,10 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_edit_mode[2]->set_button_group(uv_edit_group);
|
||||
uv_edit_mode[3]->set_button_group(uv_edit_group);
|
||||
|
||||
uv_edit_mode[0]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(0));
|
||||
uv_edit_mode[1]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(1));
|
||||
uv_edit_mode[2]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(2));
|
||||
uv_edit_mode[3]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(3));
|
||||
uv_edit_mode[0]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(0));
|
||||
uv_edit_mode[1]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(1));
|
||||
uv_edit_mode[2]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(2));
|
||||
uv_edit_mode[3]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(3));
|
||||
|
||||
uv_mode_hb->add_child(memnew(VSeparator));
|
||||
|
||||
@ -1354,7 +1354,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_button[i]->set_theme_type_variation("FlatButton");
|
||||
uv_button[i]->set_toggle_mode(true);
|
||||
uv_mode_hb->add_child(uv_button[i]);
|
||||
uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
|
||||
uv_button[i]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
|
||||
uv_button[i]->set_focus_mode(FOCUS_NONE);
|
||||
}
|
||||
|
||||
@ -1521,7 +1521,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
sync_bones = memnew(Button(TTR("Sync Bones to Polygon")));
|
||||
bone_scroll_main_vb->add_child(sync_bones);
|
||||
sync_bones->set_h_size_flags(0);
|
||||
sync_bones->connect("pressed", callable_mp(this, &Polygon2DEditor::_sync_bones));
|
||||
sync_bones->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_sync_bones));
|
||||
uv_main_hsc->add_child(bone_scroll_main_vb);
|
||||
bone_scroll = memnew(ScrollContainer);
|
||||
bone_scroll->set_v_scroll(true);
|
||||
|
@ -538,13 +538,13 @@ Polygon3DEditor::Polygon3DEditor() {
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
add_child(button_create);
|
||||
button_create->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
add_child(button_edit);
|
||||
button_edit->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
||||
mode = MODE_EDIT;
|
||||
|
@ -385,8 +385,8 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
|
||||
dialog = memnew(AcceptDialog);
|
||||
add_child(dialog);
|
||||
|
||||
load->connect("pressed", callable_mp(this, &ResourcePreloaderEditor::_load_pressed));
|
||||
paste->connect("pressed", callable_mp(this, &ResourcePreloaderEditor::_paste_pressed));
|
||||
load->connect(SceneStringName(pressed), callable_mp(this, &ResourcePreloaderEditor::_load_pressed));
|
||||
paste->connect(SceneStringName(pressed), callable_mp(this, &ResourcePreloaderEditor::_paste_pressed));
|
||||
file->connect("files_selected", callable_mp(this, &ResourcePreloaderEditor::_files_load_request));
|
||||
tree->connect("item_edited", callable_mp(this, &ResourcePreloaderEditor::_item_edited));
|
||||
loading_scene = false;
|
||||
|
@ -202,11 +202,11 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
|
||||
assign = memnew(Button);
|
||||
assign->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
assign->set_clip_text(true);
|
||||
assign->connect("pressed", callable_mp(this, &EditorPropertyRootMotion::_node_assign));
|
||||
assign->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyRootMotion::_node_assign));
|
||||
hbc->add_child(assign);
|
||||
|
||||
clear = memnew(Button);
|
||||
clear->connect("pressed", callable_mp(this, &EditorPropertyRootMotion::_node_clear));
|
||||
clear->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyRootMotion::_node_clear));
|
||||
hbc->add_child(clear);
|
||||
|
||||
filter_dialog = memnew(ConfirmationDialog);
|
||||
|
@ -4148,14 +4148,14 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||
site_search = memnew(Button);
|
||||
site_search->set_flat(true);
|
||||
site_search->set_text(TTR("Online Docs"));
|
||||
site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
|
||||
site_search->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
|
||||
menu_hb->add_child(site_search);
|
||||
site_search->set_tooltip_text(TTR("Open Godot online documentation."));
|
||||
|
||||
help_search = memnew(Button);
|
||||
help_search->set_flat(true);
|
||||
help_search->set_text(TTR("Search Help"));
|
||||
help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_HELP));
|
||||
help_search->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_HELP));
|
||||
menu_hb->add_child(help_search);
|
||||
help_search->set_tooltip_text(TTR("Search the reference documentation."));
|
||||
|
||||
@ -4163,14 +4163,14 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||
|
||||
script_back = memnew(Button);
|
||||
script_back->set_flat(true);
|
||||
script_back->connect("pressed", callable_mp(this, &ScriptEditor::_history_back));
|
||||
script_back->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_back));
|
||||
menu_hb->add_child(script_back);
|
||||
script_back->set_disabled(true);
|
||||
script_back->set_tooltip_text(TTR("Go to previous edited document."));
|
||||
|
||||
script_forward = memnew(Button);
|
||||
script_forward->set_flat(true);
|
||||
script_forward->connect("pressed", callable_mp(this, &ScriptEditor::_history_forward));
|
||||
script_forward->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_forward));
|
||||
menu_hb->add_child(script_forward);
|
||||
script_forward->set_disabled(true);
|
||||
script_forward->set_tooltip_text(TTR("Go to next edited document."));
|
||||
|
@ -286,7 +286,7 @@ ShaderFileEditor::ShaderFileEditor() {
|
||||
stage_hb->add_child(button);
|
||||
stages[i] = button;
|
||||
button->set_button_group(bg);
|
||||
button->connect("pressed", callable_mp(this, &ShaderFileEditor::_version_selected).bind(i));
|
||||
button->connect(SceneStringName(pressed), callable_mp(this, &ShaderFileEditor::_version_selected).bind(i));
|
||||
}
|
||||
|
||||
error_text = memnew(RichTextLabel);
|
||||
|
@ -789,7 +789,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
key_insert_button = memnew(Button);
|
||||
key_insert_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys).bind(false));
|
||||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &Skeleton3DEditor::insert_keys).bind(false));
|
||||
key_insert_button->set_tooltip_text(TTR("Insert key of bone poses already exist track."));
|
||||
key_insert_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_to_existing_tracks", TTR("Insert Key (Existing Tracks)"), Key::INSERT));
|
||||
animation_hb->add_child(key_insert_button);
|
||||
@ -797,7 +797,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
key_insert_all_button = memnew(Button);
|
||||
key_insert_all_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_all_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_all_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys).bind(true));
|
||||
key_insert_all_button->connect(SceneStringName(pressed), callable_mp(this, &Skeleton3DEditor::insert_keys).bind(true));
|
||||
key_insert_all_button->set_tooltip_text(TTR("Insert key of all bone poses."));
|
||||
key_insert_all_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_of_all_bones", TTR("Insert Key (All Bones)"), KeyModifierMask::CMD_OR_CTRL + Key::INSERT));
|
||||
animation_hb->add_child(key_insert_all_button);
|
||||
|
@ -82,7 +82,7 @@ SkeletonIK3DEditorPlugin::SkeletonIK3DEditorPlugin() {
|
||||
play_btn->set_text(TTR("Play IK"));
|
||||
play_btn->set_toggle_mode(true);
|
||||
play_btn->hide();
|
||||
play_btn->connect("pressed", callable_mp(this, &SkeletonIK3DEditorPlugin::_play));
|
||||
play_btn->connect(SceneStringName(pressed), callable_mp(this, &SkeletonIK3DEditorPlugin::_play));
|
||||
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, play_btn);
|
||||
skeleton_ik = nullptr;
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ Sprite2DEditor::Sprite2DEditor() {
|
||||
hb->add_spacer();
|
||||
update_preview = memnew(Button);
|
||||
update_preview->set_text(TTR("Update Preview"));
|
||||
update_preview->connect("pressed", callable_mp(this, &Sprite2DEditor::_update_mesh_data));
|
||||
update_preview->connect(SceneStringName(pressed), callable_mp(this, &Sprite2DEditor::_update_mesh_data));
|
||||
hb->add_child(update_preview);
|
||||
vb->add_margin_child(TTR("Settings:"), hb);
|
||||
|
||||
|
@ -1782,13 +1782,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
add_anim = memnew(Button);
|
||||
add_anim->set_theme_type_variation("FlatButton");
|
||||
hbc_animlist->add_child(add_anim);
|
||||
add_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_add));
|
||||
add_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_add));
|
||||
|
||||
delete_anim = memnew(Button);
|
||||
delete_anim->set_theme_type_variation("FlatButton");
|
||||
hbc_animlist->add_child(delete_anim);
|
||||
delete_anim->set_disabled(true);
|
||||
delete_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
|
||||
delete_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_remove));
|
||||
|
||||
autoplay_container = memnew(HBoxContainer);
|
||||
hbc_animlist->add_child(autoplay_container);
|
||||
@ -1806,7 +1806,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
anim_loop->set_toggle_mode(true);
|
||||
anim_loop->set_theme_type_variation("FlatButton");
|
||||
anim_loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
|
||||
anim_loop->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
|
||||
hbc_animlist->add_child(anim_loop);
|
||||
|
||||
anim_speed = memnew(SpinBox);
|
||||
@ -1890,13 +1890,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
|
||||
playback_container->add_child(memnew(VSeparator));
|
||||
|
||||
autoplay->connect("pressed", callable_mp(this, &SpriteFramesEditor::_autoplay_pressed));
|
||||
autoplay->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_autoplay_pressed));
|
||||
autoplay->set_toggle_mode(true);
|
||||
play->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_pressed));
|
||||
play_from->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_from_pressed));
|
||||
play_bw->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_bw_pressed));
|
||||
play_bw_from->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_bw_from_pressed));
|
||||
stop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_stop_pressed));
|
||||
play->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_play_pressed));
|
||||
play_from->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_play_from_pressed));
|
||||
play_bw->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_play_bw_pressed));
|
||||
play_bw_from->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_play_bw_from_pressed));
|
||||
stop->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_stop_pressed));
|
||||
|
||||
HBoxContainer *hbc_actions = memnew(HBoxContainer);
|
||||
hfc->add_child(hbc_actions);
|
||||
@ -1973,19 +1973,19 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
hfc->add_child(hbc_zoom);
|
||||
|
||||
zoom_out = memnew(Button);
|
||||
zoom_out->connect("pressed", callable_mp(this, &SpriteFramesEditor::_zoom_out));
|
||||
zoom_out->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_out));
|
||||
zoom_out->set_flat(true);
|
||||
zoom_out->set_tooltip_text(TTR("Zoom Out"));
|
||||
hbc_zoom->add_child(zoom_out);
|
||||
|
||||
zoom_reset = memnew(Button);
|
||||
zoom_reset->connect("pressed", callable_mp(this, &SpriteFramesEditor::_zoom_reset));
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_reset));
|
||||
zoom_reset->set_flat(true);
|
||||
zoom_reset->set_tooltip_text(TTR("Zoom Reset"));
|
||||
hbc_zoom->add_child(zoom_reset);
|
||||
|
||||
zoom_in = memnew(Button);
|
||||
zoom_in->connect("pressed", callable_mp(this, &SpriteFramesEditor::_zoom_in));
|
||||
zoom_in->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_in));
|
||||
zoom_in->set_flat(true);
|
||||
zoom_in->set_tooltip_text(TTR("Zoom In"));
|
||||
hbc_zoom->add_child(zoom_in);
|
||||
@ -2014,15 +2014,15 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
dialog = memnew(AcceptDialog);
|
||||
add_child(dialog);
|
||||
|
||||
load->connect("pressed", callable_mp(this, &SpriteFramesEditor::_load_pressed));
|
||||
load_sheet->connect("pressed", callable_mp(this, &SpriteFramesEditor::_open_sprite_sheet));
|
||||
delete_frame->connect("pressed", callable_mp(this, &SpriteFramesEditor::_delete_pressed));
|
||||
copy->connect("pressed", callable_mp(this, &SpriteFramesEditor::_copy_pressed));
|
||||
paste->connect("pressed", callable_mp(this, &SpriteFramesEditor::_paste_pressed));
|
||||
empty_before->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty_pressed));
|
||||
empty_after->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty2_pressed));
|
||||
move_up->connect("pressed", callable_mp(this, &SpriteFramesEditor::_up_pressed));
|
||||
move_down->connect("pressed", callable_mp(this, &SpriteFramesEditor::_down_pressed));
|
||||
load->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_load_pressed));
|
||||
load_sheet->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_open_sprite_sheet));
|
||||
delete_frame->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_delete_pressed));
|
||||
copy->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_copy_pressed));
|
||||
paste->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_paste_pressed));
|
||||
empty_before->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_empty_pressed));
|
||||
empty_after->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_empty2_pressed));
|
||||
move_up->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_up_pressed));
|
||||
move_down->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_down_pressed));
|
||||
|
||||
load->set_shortcut_context(frame_list);
|
||||
load->set_shortcut(ED_SHORTCUT("sprite_frames/load_from_file", TTR("Add frame from file"), KeyModifierMask::CMD_OR_CTRL | Key::O));
|
||||
@ -2096,12 +2096,12 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
|
||||
Button *select_all = memnew(Button);
|
||||
select_all->set_text(TTR("Select All"));
|
||||
select_all->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_select_all_frames));
|
||||
select_all->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_select_all_frames));
|
||||
split_sheet_menu_hb->add_child(select_all);
|
||||
|
||||
Button *clear_all = memnew(Button);
|
||||
clear_all->set_text(TTR("Select None"));
|
||||
clear_all->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_clear_all_frames));
|
||||
clear_all->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_clear_all_frames));
|
||||
split_sheet_menu_hb->add_child(clear_all);
|
||||
|
||||
split_sheet_menu_hb->add_spacer();
|
||||
@ -2109,7 +2109,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
toggle_settings_button = memnew(Button);
|
||||
toggle_settings_button->set_h_size_flags(SIZE_SHRINK_END);
|
||||
toggle_settings_button->set_theme_type_variation("FlatButton");
|
||||
toggle_settings_button->connect("pressed", callable_mp(this, &SpriteFramesEditor::_toggle_show_settings));
|
||||
toggle_settings_button->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_toggle_show_settings));
|
||||
toggle_settings_button->set_tooltip_text(TTR("Toggle Settings Panel"));
|
||||
split_sheet_menu_hb->add_child(toggle_settings_button);
|
||||
|
||||
@ -2149,21 +2149,21 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
split_sheet_zoom_out->set_theme_type_variation("FlatButton");
|
||||
split_sheet_zoom_out->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_out->set_tooltip_text(TTR("Zoom Out"));
|
||||
split_sheet_zoom_out->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_zoom_out));
|
||||
split_sheet_zoom_out->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_out));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_out);
|
||||
|
||||
split_sheet_zoom_reset = memnew(Button);
|
||||
split_sheet_zoom_reset->set_theme_type_variation("FlatButton");
|
||||
split_sheet_zoom_reset->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_reset->set_tooltip_text(TTR("Zoom Reset"));
|
||||
split_sheet_zoom_reset->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_zoom_reset));
|
||||
split_sheet_zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_reset));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_reset);
|
||||
|
||||
split_sheet_zoom_in = memnew(Button);
|
||||
split_sheet_zoom_in->set_theme_type_variation("FlatButton");
|
||||
split_sheet_zoom_in->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_in->set_tooltip_text(TTR("Zoom In"));
|
||||
split_sheet_zoom_in->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_zoom_in));
|
||||
split_sheet_zoom_in->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_in));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_in);
|
||||
|
||||
split_sheet_settings_vb = memnew(VBoxContainer);
|
||||
|
@ -1228,19 +1228,19 @@ TextureRegionEditor::TextureRegionEditor() {
|
||||
zoom_out = memnew(Button);
|
||||
zoom_out->set_flat(true);
|
||||
zoom_out->set_tooltip_text(TTR("Zoom Out"));
|
||||
zoom_out->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_out));
|
||||
zoom_out->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_out));
|
||||
zoom_hb->add_child(zoom_out);
|
||||
|
||||
zoom_reset = memnew(Button);
|
||||
zoom_reset->set_flat(true);
|
||||
zoom_reset->set_tooltip_text(TTR("Zoom Reset"));
|
||||
zoom_reset->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_reset));
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_reset));
|
||||
zoom_hb->add_child(zoom_reset);
|
||||
|
||||
zoom_in = memnew(Button);
|
||||
zoom_in->set_flat(true);
|
||||
zoom_in->set_tooltip_text(TTR("Zoom In"));
|
||||
zoom_in->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_in));
|
||||
zoom_in->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_in));
|
||||
zoom_hb->add_child(zoom_in);
|
||||
|
||||
vscroll = memnew(VScrollBar);
|
||||
@ -1271,7 +1271,7 @@ bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const
|
||||
if (((Object::cast_to<Sprite2D>(p_object) || Object::cast_to<Sprite3D>(p_object) || Object::cast_to<NinePatchRect>(p_object) || Object::cast_to<StyleBoxTexture>(p_object)) && p_path == "region_rect") || (Object::cast_to<AtlasTexture>(p_object) && p_path == "region")) {
|
||||
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region"));
|
||||
button->set_icon(texture_region_editor->get_editor_theme_icon(SNAME("RegionEdit")));
|
||||
button->connect("pressed", callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit).bind(p_object));
|
||||
button->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit).bind(p_object));
|
||||
add_property_editor(p_path, button, true);
|
||||
}
|
||||
}
|
||||
|
@ -1120,15 +1120,15 @@ ThemeItemImportTree::ThemeItemImportTree() {
|
||||
select_all_items_button->set_flat(true);
|
||||
select_all_items_button->set_tooltip_text(select_all_items_tooltip);
|
||||
button_set->add_child(select_all_items_button);
|
||||
select_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_all_data_type_pressed).bind(i));
|
||||
select_all_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_all_data_type_pressed).bind(i));
|
||||
select_full_items_button->set_flat(true);
|
||||
select_full_items_button->set_tooltip_text(select_full_items_tooltip);
|
||||
button_set->add_child(select_full_items_button);
|
||||
select_full_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_full_data_type_pressed).bind(i));
|
||||
select_full_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_full_data_type_pressed).bind(i));
|
||||
deselect_all_items_button->set_flat(true);
|
||||
deselect_all_items_button->set_tooltip_text(deselect_all_items_tooltip);
|
||||
button_set->add_child(deselect_all_items_button);
|
||||
deselect_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_deselect_all_data_type_pressed).bind(i));
|
||||
deselect_all_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_deselect_all_data_type_pressed).bind(i));
|
||||
|
||||
total_selected_items_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
total_selected_items_label->hide();
|
||||
@ -1159,12 +1159,12 @@ ThemeItemImportTree::ThemeItemImportTree() {
|
||||
import_collapse_types_button->set_flat(true);
|
||||
import_collapse_types_button->set_tooltip_text(TTR("Collapse types."));
|
||||
import_buttons->add_child(import_collapse_types_button);
|
||||
import_collapse_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(true));
|
||||
import_collapse_types_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(true));
|
||||
import_expand_types_button = memnew(Button);
|
||||
import_expand_types_button->set_flat(true);
|
||||
import_expand_types_button->set_tooltip_text(TTR("Expand types."));
|
||||
import_buttons->add_child(import_expand_types_button);
|
||||
import_expand_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(false));
|
||||
import_expand_types_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(false));
|
||||
|
||||
import_buttons->add_child(memnew(VSeparator));
|
||||
|
||||
@ -1173,26 +1173,26 @@ ThemeItemImportTree::ThemeItemImportTree() {
|
||||
import_select_all_button->set_text(TTR("Select All"));
|
||||
import_select_all_button->set_tooltip_text(TTR("Select all Theme items."));
|
||||
import_buttons->add_child(import_select_all_button);
|
||||
import_select_all_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_all_items_pressed));
|
||||
import_select_all_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_all_items_pressed));
|
||||
import_select_full_button = memnew(Button);
|
||||
import_select_full_button->set_flat(true);
|
||||
import_select_full_button->set_text(TTR("Select With Data"));
|
||||
import_select_full_button->set_tooltip_text(TTR("Select all Theme items with item data."));
|
||||
import_buttons->add_child(import_select_full_button);
|
||||
import_select_full_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_full_items_pressed));
|
||||
import_select_full_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_full_items_pressed));
|
||||
import_deselect_all_button = memnew(Button);
|
||||
import_deselect_all_button->set_flat(true);
|
||||
import_deselect_all_button->set_text(TTR("Deselect All"));
|
||||
import_deselect_all_button->set_tooltip_text(TTR("Deselect all Theme items."));
|
||||
import_buttons->add_child(import_deselect_all_button);
|
||||
import_deselect_all_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_deselect_all_items_pressed));
|
||||
import_deselect_all_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_deselect_all_items_pressed));
|
||||
|
||||
import_buttons->add_spacer();
|
||||
|
||||
Button *import_add_selected_button = memnew(Button);
|
||||
import_add_selected_button->set_text(TTR("Import Selected"));
|
||||
import_buttons->add_child(import_add_selected_button);
|
||||
import_add_selected_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_import_selected));
|
||||
import_add_selected_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_import_selected));
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
@ -1950,7 +1950,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
||||
edit_add_type_hb->add_child(edit_add_type_value);
|
||||
edit_add_type_button = memnew(Button);
|
||||
edit_add_type_hb->add_child(edit_add_type_button);
|
||||
edit_add_type_button->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_add_theme_type).bind(""));
|
||||
edit_add_type_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_add_theme_type).bind(""));
|
||||
|
||||
VBoxContainer *edit_items_vb = memnew(VBoxContainer);
|
||||
edit_items_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
@ -1968,42 +1968,42 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
||||
edit_items_add_color->set_flat(true);
|
||||
edit_items_add_color->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_color);
|
||||
edit_items_add_color->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_COLOR));
|
||||
edit_items_add_color->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_COLOR));
|
||||
|
||||
edit_items_add_constant = memnew(Button);
|
||||
edit_items_add_constant->set_tooltip_text(TTR("Add Constant Item"));
|
||||
edit_items_add_constant->set_flat(true);
|
||||
edit_items_add_constant->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_constant);
|
||||
edit_items_add_constant->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_CONSTANT));
|
||||
edit_items_add_constant->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_CONSTANT));
|
||||
|
||||
edit_items_add_font = memnew(Button);
|
||||
edit_items_add_font->set_tooltip_text(TTR("Add Font Item"));
|
||||
edit_items_add_font->set_flat(true);
|
||||
edit_items_add_font->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_font);
|
||||
edit_items_add_font->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT));
|
||||
edit_items_add_font->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT));
|
||||
|
||||
edit_items_add_font_size = memnew(Button);
|
||||
edit_items_add_font_size->set_tooltip_text(TTR("Add Font Size Item"));
|
||||
edit_items_add_font_size->set_flat(true);
|
||||
edit_items_add_font_size->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_font_size);
|
||||
edit_items_add_font_size->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT_SIZE));
|
||||
edit_items_add_font_size->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT_SIZE));
|
||||
|
||||
edit_items_add_icon = memnew(Button);
|
||||
edit_items_add_icon->set_tooltip_text(TTR("Add Icon Item"));
|
||||
edit_items_add_icon->set_flat(true);
|
||||
edit_items_add_icon->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_icon);
|
||||
edit_items_add_icon->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_ICON));
|
||||
edit_items_add_icon->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_ICON));
|
||||
|
||||
edit_items_add_stylebox = memnew(Button);
|
||||
edit_items_add_stylebox->set_tooltip_text(TTR("Add StyleBox Item"));
|
||||
edit_items_add_stylebox->set_flat(true);
|
||||
edit_items_add_stylebox->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_stylebox);
|
||||
edit_items_add_stylebox->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_STYLEBOX));
|
||||
edit_items_add_stylebox->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_STYLEBOX));
|
||||
|
||||
edit_items_toolbar->add_child(memnew(VSeparator));
|
||||
|
||||
@ -2016,21 +2016,21 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
||||
edit_items_remove_class->set_flat(true);
|
||||
edit_items_remove_class->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_class);
|
||||
edit_items_remove_class->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_remove_class_items));
|
||||
edit_items_remove_class->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_remove_class_items));
|
||||
|
||||
edit_items_remove_custom = memnew(Button);
|
||||
edit_items_remove_custom->set_tooltip_text(TTR("Remove Custom Items"));
|
||||
edit_items_remove_custom->set_flat(true);
|
||||
edit_items_remove_custom->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_custom);
|
||||
edit_items_remove_custom->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_remove_custom_items));
|
||||
edit_items_remove_custom->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_remove_custom_items));
|
||||
|
||||
edit_items_remove_all = memnew(Button);
|
||||
edit_items_remove_all->set_tooltip_text(TTR("Remove All Items"));
|
||||
edit_items_remove_all->set_flat(true);
|
||||
edit_items_remove_all->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_all);
|
||||
edit_items_remove_all->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_remove_all_items));
|
||||
edit_items_remove_all->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_remove_all_items));
|
||||
|
||||
edit_items_tree = memnew(Tree);
|
||||
edit_items_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
@ -2096,7 +2096,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
||||
import_another_file_hb->add_child(import_another_theme_value);
|
||||
import_another_theme_button = memnew(Button);
|
||||
import_another_file_hb->add_child(import_another_theme_button);
|
||||
import_another_theme_button->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_select_another_theme));
|
||||
import_another_theme_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_select_another_theme));
|
||||
|
||||
import_another_theme_dialog = memnew(EditorFileDialog);
|
||||
import_another_theme_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
|
||||
@ -2296,7 +2296,7 @@ VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) {
|
||||
item_add_button->set_text(TTR("Add"));
|
||||
item_add_button->set_disabled(true);
|
||||
item_add_hb->add_child(item_add_button);
|
||||
item_add_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_add_cbk).bind(p_data_type, item_add_edit));
|
||||
item_add_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_add_cbk).bind(p_data_type, item_add_edit));
|
||||
item_add_edit->set_meta("button", item_add_button);
|
||||
item_add_edit->connect("text_changed", callable_mp(this, &ThemeTypeEditor::_update_add_button).bind(item_add_edit));
|
||||
|
||||
@ -2472,21 +2472,21 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
||||
item_rename_button->set_tooltip_text(TTR("Rename Item"));
|
||||
item_rename_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_button);
|
||||
item_rename_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
|
||||
|
||||
Button *item_remove_button = memnew(Button);
|
||||
item_remove_button->set_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
item_remove_button->set_tooltip_text(TTR("Remove Item"));
|
||||
item_remove_button->set_flat(true);
|
||||
item_name_container->add_child(item_remove_button);
|
||||
item_remove_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
|
||||
item_remove_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
|
||||
|
||||
Button *item_rename_confirm_button = memnew(Button);
|
||||
item_rename_confirm_button->set_icon(get_editor_theme_icon(SNAME("ImportCheck")));
|
||||
item_rename_confirm_button->set_tooltip_text(TTR("Confirm Item Rename"));
|
||||
item_rename_confirm_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_confirm_button);
|
||||
item_rename_confirm_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed).bind(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_confirm_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed).bind(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_confirm_button->hide();
|
||||
|
||||
Button *item_rename_cancel_button = memnew(Button);
|
||||
@ -2494,7 +2494,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
||||
item_rename_cancel_button->set_tooltip_text(TTR("Cancel Item Rename"));
|
||||
item_rename_cancel_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_cancel_button);
|
||||
item_rename_cancel_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_canceled).bind(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_cancel_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_canceled).bind(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_cancel_button->hide();
|
||||
} else {
|
||||
item_name->add_theme_color_override("font_color", get_theme_color(SNAME("font_disabled_color"), EditorStringName(Editor)));
|
||||
@ -2504,7 +2504,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
||||
item_override_button->set_tooltip_text(TTR("Override Item"));
|
||||
item_override_button->set_flat(true);
|
||||
item_name_container->add_child(item_override_button);
|
||||
item_override_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_override_cbk).bind(p_data_type, p_item_name));
|
||||
item_override_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_override_cbk).bind(p_data_type, p_item_name));
|
||||
}
|
||||
|
||||
return item_control;
|
||||
@ -2712,7 +2712,7 @@ void ThemeTypeEditor::_update_type_items() {
|
||||
pin_leader_button->set_icon(get_editor_theme_icon(SNAME("Pin")));
|
||||
pin_leader_button->set_tooltip_text(TTR("Unpin this StyleBox as a main style."));
|
||||
item_control->add_child(pin_leader_button);
|
||||
pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_unpin_leader_button_pressed));
|
||||
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_unpin_leader_button_pressed));
|
||||
|
||||
item_control->add_child(item_editor);
|
||||
|
||||
@ -2755,7 +2755,7 @@ void ThemeTypeEditor::_update_type_items() {
|
||||
pin_leader_button->set_icon(get_editor_theme_icon(SNAME("Pin")));
|
||||
pin_leader_button->set_tooltip_text(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
|
||||
item_control->add_child(pin_leader_button);
|
||||
pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
|
||||
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
|
||||
} else {
|
||||
if (ThemeDB::get_singleton()->get_default_theme()->has_stylebox(E.key, edited_type)) {
|
||||
item_editor->set_edited_resource(ThemeDB::get_singleton()->get_default_theme()->get_stylebox(E.key, edited_type));
|
||||
@ -3446,7 +3446,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
||||
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."));
|
||||
type_list_hb->add_child(add_type_button);
|
||||
add_type_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_add_type_button_cbk));
|
||||
add_type_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_button_cbk));
|
||||
|
||||
HBoxContainer *type_controls = memnew(HBoxContainer);
|
||||
main_vb->add_child(type_controls);
|
||||
@ -3457,14 +3457,14 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
||||
show_default_items_button->set_tooltip_text(TTR("Show default type items alongside items that have been overridden."));
|
||||
show_default_items_button->set_pressed(true);
|
||||
type_controls->add_child(show_default_items_button);
|
||||
show_default_items_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_update_type_items));
|
||||
show_default_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_update_type_items));
|
||||
|
||||
Button *add_default_items_button = memnew(Button);
|
||||
add_default_items_button->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
add_default_items_button->set_text(TTR("Override All"));
|
||||
add_default_items_button->set_tooltip_text(TTR("Override all default type items."));
|
||||
type_controls->add_child(add_default_items_button);
|
||||
add_default_items_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_add_default_type_items));
|
||||
add_default_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_default_type_items));
|
||||
|
||||
data_type_tabs = memnew(TabContainer);
|
||||
data_type_tabs->set_tab_alignment(TabBar::ALIGNMENT_CENTER);
|
||||
@ -3510,7 +3510,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
||||
type_variation_button = memnew(Button);
|
||||
type_variation_hb->add_child(type_variation_button);
|
||||
type_variation_button->set_tooltip_text(TTR("Select the variation base type from a list of available types."));
|
||||
type_variation_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_add_type_variation_cbk));
|
||||
type_variation_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_variation_cbk));
|
||||
|
||||
type_variation_locked = memnew(Label);
|
||||
type_variation_vb->add_child(type_variation_locked);
|
||||
@ -3691,19 +3691,19 @@ ThemeEditor::ThemeEditor() {
|
||||
Button *theme_save_button = memnew(Button);
|
||||
theme_save_button->set_text(TTR("Save"));
|
||||
theme_save_button->set_flat(true);
|
||||
theme_save_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(false));
|
||||
theme_save_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(false));
|
||||
top_menu->add_child(theme_save_button);
|
||||
|
||||
Button *theme_save_as_button = memnew(Button);
|
||||
theme_save_as_button->set_text(TTR("Save As..."));
|
||||
theme_save_as_button->set_flat(true);
|
||||
theme_save_as_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(true));
|
||||
theme_save_as_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(true));
|
||||
top_menu->add_child(theme_save_as_button);
|
||||
|
||||
Button *theme_close_button = memnew(Button);
|
||||
theme_close_button->set_text(TTR("Close"));
|
||||
theme_close_button->set_flat(true);
|
||||
theme_close_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_close_button_cbk));
|
||||
theme_close_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_close_button_cbk));
|
||||
top_menu->add_child(theme_close_button);
|
||||
|
||||
top_menu->add_child(memnew(VSeparator));
|
||||
@ -3712,7 +3712,7 @@ ThemeEditor::ThemeEditor() {
|
||||
theme_edit_button->set_text(TTR("Manage Items..."));
|
||||
theme_edit_button->set_tooltip_text(TTR("Add, remove, organize and import Theme items."));
|
||||
theme_edit_button->set_flat(true);
|
||||
theme_edit_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_edit_button_cbk));
|
||||
theme_edit_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_edit_button_cbk));
|
||||
top_menu->add_child(theme_edit_button);
|
||||
|
||||
theme_type_editor = memnew(ThemeTypeEditor);
|
||||
@ -3748,7 +3748,7 @@ ThemeEditor::ThemeEditor() {
|
||||
add_preview_button = memnew(Button);
|
||||
add_preview_button->set_text(TTR("Add Preview"));
|
||||
add_preview_button_hb->add_child(add_preview_button);
|
||||
add_preview_button->connect("pressed", callable_mp(this, &ThemeEditor::_add_preview_button_cbk));
|
||||
add_preview_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_add_preview_button_cbk));
|
||||
|
||||
DefaultThemeEditorPreview *default_preview_tab = memnew(DefaultThemeEditorPreview);
|
||||
preview_tabs_content->add_child(default_preview_tab);
|
||||
|
@ -243,7 +243,7 @@ ThemeEditorPreview::ThemeEditorPreview() {
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_tooltip_text(TTR("Toggle the control picker, allowing to visually select control types for edit."));
|
||||
picker_button->connect("pressed", callable_mp(this, &ThemeEditorPreview::_picker_button_cbk));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditorPreview::_picker_button_cbk));
|
||||
|
||||
MarginContainer *preview_body = memnew(MarginContainer);
|
||||
preview_body->set_custom_minimum_size(Size2(480, 0) * EDSCALE);
|
||||
@ -531,5 +531,5 @@ SceneThemeEditorPreview::SceneThemeEditorPreview() {
|
||||
reload_scene_button->set_flat(true);
|
||||
reload_scene_button->set_tooltip_text(TTR("Reload the scene to reflect its most actual state."));
|
||||
preview_toolbar->add_child(reload_scene_button);
|
||||
reload_scene_button->connect("pressed", callable_mp(this, &SceneThemeEditorPreview::_reload_scene));
|
||||
reload_scene_button->connect(SceneStringName(pressed), callable_mp(this, &SceneThemeEditorPreview::_reload_scene));
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ TileAtlasView::TileAtlasView() {
|
||||
button_center_view = memnew(Button);
|
||||
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
|
||||
button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
|
||||
button_center_view->connect("pressed", callable_mp(this, &TileAtlasView::_center_view));
|
||||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &TileAtlasView::_center_view));
|
||||
button_center_view->set_flat(true);
|
||||
button_center_view->set_disabled(true);
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
|
@ -952,7 +952,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
button_center_view = memnew(Button);
|
||||
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
|
||||
button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
|
||||
button_center_view->connect("pressed", callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
||||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
||||
button_center_view->set_theme_type_variation("FlatButton");
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->set_disabled(true);
|
||||
|
@ -616,7 +616,7 @@ bool TileMapLayerEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEven
|
||||
b->set_pressed(b->get_button_group().is_valid() || !b->is_pressed());
|
||||
} else {
|
||||
// Can't press a button without toggle mode, so just emit the signal directly.
|
||||
b->emit_signal(SNAME("pressed"));
|
||||
b->emit_signal(SceneStringName(pressed));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -2209,7 +2209,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
select_tool_button->set_toggle_mode(true);
|
||||
select_tool_button->set_button_group(tool_buttons_group);
|
||||
select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", TTR("Selection"), Key::S));
|
||||
select_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
select_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(select_tool_button);
|
||||
viewport_shortcut_buttons.push_back(select_tool_button);
|
||||
|
||||
@ -2219,7 +2219,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
paint_tool_button->set_button_group(tool_buttons_group);
|
||||
paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", TTR("Paint"), Key::D));
|
||||
paint_tool_button->set_tooltip_text(TTR("Shift: Draw line.") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Shift: Draw rectangle."));
|
||||
paint_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
paint_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(paint_tool_button);
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
@ -2229,7 +2229,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
line_tool_button->set_button_group(tool_buttons_group);
|
||||
// TRANSLATORS: This refers to the line tool in the tilemap editor.
|
||||
line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", TTR("Line", "Tool"), Key::L));
|
||||
line_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
line_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(line_tool_button);
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
@ -2238,7 +2238,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
rect_tool_button->set_toggle_mode(true);
|
||||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", TTR("Rect"), Key::R));
|
||||
rect_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
rect_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(rect_tool_button);
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
@ -2247,7 +2247,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
bucket_tool_button->set_toggle_mode(true);
|
||||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", TTR("Bucket"), Key::B));
|
||||
bucket_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
bucket_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(bucket_tool_button);
|
||||
toolbar->add_child(tilemap_tiles_tools_buttons);
|
||||
viewport_shortcut_buttons.push_back(bucket_tool_button);
|
||||
@ -2266,7 +2266,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P));
|
||||
Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
|
||||
picker_button->set_tooltip_text(vformat(TTR("Alternatively hold %s with other tools to pick tile."), find_keycode_name(key)));
|
||||
picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
tools_settings->add_child(picker_button);
|
||||
viewport_shortcut_buttons.push_back(picker_button);
|
||||
|
||||
@ -2276,7 +2276,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
erase_button->set_toggle_mode(true);
|
||||
erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E));
|
||||
erase_button->set_tooltip_text(TTR("Alternatively use RMB to erase tiles."));
|
||||
erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
erase_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
tools_settings->add_child(erase_button);
|
||||
viewport_shortcut_buttons.push_back(erase_button);
|
||||
|
||||
@ -2289,28 +2289,28 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
transform_button_rotate_left->set_theme_type_variation("FlatButton");
|
||||
transform_button_rotate_left->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_left", TTR("Rotate Tile Left"), Key::Z));
|
||||
transform_toolbar->add_child(transform_button_rotate_left);
|
||||
transform_button_rotate_left->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_LEFT));
|
||||
transform_button_rotate_left->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_LEFT));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_left);
|
||||
|
||||
transform_button_rotate_right = memnew(Button);
|
||||
transform_button_rotate_right->set_theme_type_variation("FlatButton");
|
||||
transform_button_rotate_right->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_right", TTR("Rotate Tile Right"), Key::X));
|
||||
transform_toolbar->add_child(transform_button_rotate_right);
|
||||
transform_button_rotate_right->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_RIGHT));
|
||||
transform_button_rotate_right->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_RIGHT));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_right);
|
||||
|
||||
transform_button_flip_h = memnew(Button);
|
||||
transform_button_flip_h->set_theme_type_variation("FlatButton");
|
||||
transform_button_flip_h->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_horizontal", TTR("Flip Tile Horizontally"), Key::C));
|
||||
transform_toolbar->add_child(transform_button_flip_h);
|
||||
transform_button_flip_h->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_H));
|
||||
transform_button_flip_h->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_H));
|
||||
viewport_shortcut_buttons.push_back(transform_button_flip_h);
|
||||
|
||||
transform_button_flip_v = memnew(Button);
|
||||
transform_button_flip_v->set_theme_type_variation("FlatButton");
|
||||
transform_button_flip_v->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_vertical", TTR("Flip Tile Vertically"), Key::V));
|
||||
transform_toolbar->add_child(transform_button_flip_v);
|
||||
transform_button_flip_v->connect("pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_V));
|
||||
transform_button_flip_v->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_V));
|
||||
viewport_shortcut_buttons.push_back(transform_button_flip_v);
|
||||
|
||||
// Separator 2.
|
||||
@ -3553,7 +3553,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
paint_tool_button->set_button_group(tool_buttons_group);
|
||||
paint_tool_button->set_pressed(true);
|
||||
paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", TTR("Paint"), Key::D));
|
||||
paint_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
paint_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(paint_tool_button);
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
@ -3562,7 +3562,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
line_tool_button->set_toggle_mode(true);
|
||||
line_tool_button->set_button_group(tool_buttons_group);
|
||||
line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", TTR("Line"), Key::L));
|
||||
line_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
line_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(line_tool_button);
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
@ -3571,7 +3571,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
rect_tool_button->set_toggle_mode(true);
|
||||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", TTR("Rect"), Key::R));
|
||||
rect_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
rect_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(rect_tool_button);
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
@ -3580,7 +3580,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
bucket_tool_button->set_toggle_mode(true);
|
||||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", TTR("Bucket"), Key::B));
|
||||
bucket_tool_button->connect("pressed", callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
bucket_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
tilemap_tiles_tools_buttons->add_child(bucket_tool_button);
|
||||
viewport_shortcut_buttons.push_back(bucket_tool_button);
|
||||
|
||||
@ -3598,7 +3598,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P));
|
||||
picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
tools_settings->add_child(picker_button);
|
||||
viewport_shortcut_buttons.push_back(picker_button);
|
||||
|
||||
@ -3607,7 +3607,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
erase_button->set_theme_type_variation("FlatButton");
|
||||
erase_button->set_toggle_mode(true);
|
||||
erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E));
|
||||
erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
erase_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
tools_settings->add_child(erase_button);
|
||||
viewport_shortcut_buttons.push_back(erase_button);
|
||||
|
||||
@ -4457,19 +4457,19 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
||||
select_previous_layer = memnew(Button);
|
||||
select_previous_layer->set_theme_type_variation("FlatButton");
|
||||
select_previous_layer->set_tooltip_text(TTR("Select previous layer"));
|
||||
select_previous_layer->connect("pressed", callable_mp(this, &TileMapLayerEditor::_select_previous_layer_pressed));
|
||||
select_previous_layer->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_previous_layer_pressed));
|
||||
layer_selection_hbox->add_child(select_previous_layer);
|
||||
|
||||
select_next_layer = memnew(Button);
|
||||
select_next_layer->set_theme_type_variation("FlatButton");
|
||||
select_next_layer->set_tooltip_text(TTR("Select next layer"));
|
||||
select_next_layer->connect("pressed", callable_mp(this, &TileMapLayerEditor::_select_next_layer_pressed));
|
||||
select_next_layer->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_next_layer_pressed));
|
||||
layer_selection_hbox->add_child(select_next_layer);
|
||||
|
||||
select_all_layers = memnew(Button);
|
||||
select_all_layers->set_theme_type_variation("FlatButton");
|
||||
select_all_layers->set_text(TTR("Select all layers"));
|
||||
select_all_layers->connect("pressed", callable_mp(this, &TileMapLayerEditor::_select_all_layers_pressed));
|
||||
select_all_layers->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_all_layers_pressed));
|
||||
select_all_layers->set_tooltip_text(TTR("Select all TileMapLayers in scene"));
|
||||
layer_selection_hbox->add_child(select_all_layers);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user