[Scene] Add SceneStringNames::pressed

This commit is contained in:
A Thousand Ships 2024-05-14 09:40:21 +02:00
parent 78cce1954d
commit ee79386f7b
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
147 changed files with 727 additions and 722 deletions

View file

@ -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);