aboutsummaryrefslogtreecommitdiff
path: root/editor/animation_editor.cpp
diff options
context:
space:
mode:
authorGilles Roudière2018-04-27 10:42:13 +0200
committerGitHub2018-04-27 10:42:13 +0200
commitb35f3a569e578c5ff7eb73257f84d74e30e361d1 (patch)
treec998ab48b9824daf8310a6d2901707e9056c3eed /editor/animation_editor.cpp
parente5a13e26265179d9d6b477c6d744758521745123 (diff)
parent6971604033b177b20d6def0779508ed1c35e61cc (diff)
downloadgodot-b35f3a569e578c5ff7eb73257f84d74e30e361d1.tar.gz
godot-b35f3a569e578c5ff7eb73257f84d74e30e361d1.tar.zst
godot-b35f3a569e578c5ff7eb73257f84d74e30e361d1.zip
Diffstat (limited to 'editor/animation_editor.cpp')
-rw-r--r--editor/animation_editor.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 51e08d63c..f7c8cac93 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -1076,6 +1076,9 @@ void AnimationKeyEditor::_track_editor_draw() {
if (!animation.is_valid()) {
v_scroll->hide();
h_scroll->hide();
+ length->set_editable(false);
+ step->set_editable(false);
+ loop->set_disabled(true);
menu_add_track->set_disabled(true);
menu_track->set_disabled(true);
edit_button->set_disabled(true);
@@ -1087,6 +1090,9 @@ void AnimationKeyEditor::_track_editor_draw() {
return;
}
+ length->set_editable(true);
+ step->set_editable(true);
+ loop->set_disabled(false);
menu_add_track->set_disabled(false);
menu_track->set_disabled(false);
edit_button->set_disabled(false);
@@ -3856,6 +3862,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
length->set_h_size_flags(SIZE_EXPAND_FILL);
length->set_stretch_ratio(1);
length->set_tooltip(TTR("Animation length (in seconds)."));
+ length->set_editable(false);
hb->add_child(length);
length->connect("value_changed", this, "_animation_len_changed");
@@ -3872,6 +3879,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
step->set_h_size_flags(SIZE_EXPAND_FILL);
step->set_stretch_ratio(1);
step->set_tooltip(TTR("Cursor step snap (in seconds)."));
+ step->set_editable(false);
hb->add_child(step);
step->connect("value_changed", this, "_step_changed");
@@ -3881,6 +3889,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
loop->connect("pressed", this, "_animation_loop_changed");
hb->add_child(loop);
loop->set_tooltip(TTR("Enable/Disable looping in animation."));
+ loop->set_disabled(true);
hb->add_child(memnew(VSeparator));
@@ -3918,7 +3927,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
menu_track = memnew(MenuButton);
hb->add_child(menu_track);
menu_track->get_popup()->connect("id_pressed", this, "_menu_track");
- menu_track->set_tooltip(TTR("Track tools"));
+ menu_track->set_tooltip(TTR("Track Tools"));
edit_button = memnew(ToolButton);
edit_button->set_toggle_mode(true);