1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Show a warning that an animation must be selected in order to edit it. Avoid copying/pasting if no anim selected. Closes #5799

This commit is contained in:
Juan Linietsky
2016-07-22 09:42:12 -03:00
parent f51a816253
commit 12472534ec
3 changed files with 21 additions and 2 deletions

View File

@@ -4075,12 +4075,22 @@ AnimationKeyEditor::AnimationKeyEditor() {
track_editor->set_h_size_flags(SIZE_EXPAND_FILL);
track_pos = memnew( Control );
track_pos->set_area_as_parent_rect();
track_pos->set_ignore_mouse(true);
track_editor->add_child(track_pos);
track_pos->connect("draw",this,"_track_pos_draw");
select_anim_warning = memnew( Label );
track_editor->add_child(select_anim_warning);
select_anim_warning->set_area_as_parent_rect();
select_anim_warning->set_text(TTR("Select an AnimationPlayer from the Scene Tree to edit animations."));
select_anim_warning->set_autowrap(true);
select_anim_warning->set_align(Label::ALIGN_CENTER);
select_anim_warning->set_valign(Label::VALIGN_CENTER);
v_scroll = memnew( VScrollBar );
hb->add_child(v_scroll);