[Scene] Add SceneStringNames::pressed
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user