mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #61106 from snailrhymer/animation-library-fixes
Fix errors and improve UX relating to new animation libraries
This commit is contained in:
commit
bd8d91254c
7 changed files with 161 additions and 51 deletions
|
@ -75,12 +75,16 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) {
|
|||
add_library_validate->set_text(error);
|
||||
add_library_dialog->get_ok_button()->set_disabled(true);
|
||||
} else {
|
||||
add_library_validate->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
if (p_name == "") {
|
||||
add_library_validate->set_text(TTR("Global library will be created."));
|
||||
if (adding_animation) {
|
||||
add_library_validate->set_text(TTR("Animation name is valid."));
|
||||
} else {
|
||||
add_library_validate->set_text(TTR("Library name is valid."));
|
||||
if (p_name == "") {
|
||||
add_library_validate->set_text(TTR("Global library will be created."));
|
||||
} else {
|
||||
add_library_validate->set_text(TTR("Library name is valid."));
|
||||
}
|
||||
}
|
||||
add_library_validate->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
add_library_dialog->get_ok_button()->set_disabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +473,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
|
|||
int attempt = 1;
|
||||
while (al->has_animation(name)) {
|
||||
attempt++;
|
||||
name = base_name + " " + itos(attempt);
|
||||
name = base_name + " (" + itos(attempt) + ")";
|
||||
}
|
||||
|
||||
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue