aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/animation_editor.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-07-22 09:42:12 -0300
committerJuan Linietsky2016-07-22 09:42:12 -0300
commit12472534ec644fbffa0d15b0ab199f41abefc324 (patch)
treee8f70bbb9761a438654f57ea2c4e279191aec23d /tools/editor/animation_editor.cpp
parentf51a8162532e135584f82ecb3ef48414fd8188cf (diff)
downloadgodot-12472534ec644fbffa0d15b0ab199f41abefc324.tar.gz
godot-12472534ec644fbffa0d15b0ab199f41abefc324.tar.zst
godot-12472534ec644fbffa0d15b0ab199f41abefc324.zip
Show a warning that an animation must be selected in order to edit it. Avoid copying/pasting if no anim selected. Closes #5799
Diffstat (limited to 'tools/editor/animation_editor.cpp')
-rw-r--r--tools/editor/animation_editor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index 9eb6b4013..aa0156b0c 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -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);