summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-04-26 22:58:30 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-04-26 22:58:30 -0300
commit6971604033b177b20d6def0779508ed1c35e61cc (patch)
treec998ab48b9824daf8310a6d2901707e9056c3eed /editor/plugins
parente5a13e26265179d9d6b477c6d744758521745123 (diff)
Numerous changes to the Animation Editor.
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 281c9028f2..220003eb73 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -491,7 +491,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
String new_name = name->get_text();
if (new_name == "" || new_name.find(":") != -1 || new_name.find("/") != -1) {
- error_dialog->set_text(TTR("ERROR: Invalid animation name!"));
+ error_dialog->set_text(TTR("Invalid animation name!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -502,7 +502,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
}
if (player->has_animation(new_name)) {
- error_dialog->set_text(TTR("ERROR: Animation name already exists!"));
+ error_dialog->set_text(TTR("Animation name already exists!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -811,6 +811,8 @@ void AnimationPlayerEditor::_update_player() {
play_bw->set_disabled(animlist.size() == 0);
play_bw_from->set_disabled(animlist.size() == 0);
play_from->set_disabled(animlist.size() == 0);
+ frame->set_editable(animlist.size() != 0);
+ animation->set_disabled(animlist.size() == 0);
autoplay->set_disabled(animlist.size() == 0);
duplicate_anim->set_disabled(animlist.size() == 0);
rename_anim->set_disabled(animlist.size() == 0);
@@ -1088,7 +1090,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_COPY_ANIM: {
if (!animation->get_item_count()) {
- error_dialog->set_text(TTR("ERROR: No animation to copy!"));
+ error_dialog->set_text(TTR("No animation to copy!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -1103,7 +1105,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
Ref<Animation> anim = EditorSettings::get_singleton()->get_resource_clipboard();
if (!anim.is_valid()) {
- error_dialog->set_text(TTR("ERROR: No animation resource on clipboard!"));
+ error_dialog->set_text(TTR("No animation resource on clipboard!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -1134,7 +1136,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_EDIT_RESOURCE: {
if (!animation->get_item_count()) {
- error_dialog->set_text(TTR("ERROR: No animation to edit!"));
+ error_dialog->set_text(TTR("No animation to edit!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -1611,7 +1613,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
hb->add_child(load_anim);
save_anim = memnew(MenuButton);
- save_anim->set_tooltip(TTR("Save the current animation"));
+ save_anim->set_tooltip(TTR("Save the current animation."));
save_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/save", TTR("Save")), ANIM_SAVE);
save_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/save_as", TTR("Save As")), ANIM_SAVE_AS);
save_anim->set_focus_mode(Control::FOCUS_NONE);
@@ -1691,6 +1693,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
pin = memnew(ToolButton);
pin->set_toggle_mode(true);
+ pin->set_tooltip(TTR("Pin AnimationPlayer"));
hb->add_child(pin);
resource_edit_anim = memnew(Button);
@@ -1718,7 +1721,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
error_dialog = memnew(ConfirmationDialog);
error_dialog->get_ok()->set_text(TTR("Close"));
- error_dialog->set_text(TTR("Error!"));
+ error_dialog->set_title(TTR("Error!"));
add_child(error_dialog);
name_dialog->connect("confirmed", this, "_animation_name_edited");