|
@@ -419,12 +419,12 @@ void AnimationLibraryEditor::_item_renamed() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int p_button) {
|
|
|
|
|
|
+void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int p_id, MouseButton p_button) {
|
|
if (p_item->get_parent() == tree->get_root()) {
|
|
if (p_item->get_parent() == tree->get_root()) {
|
|
// Library
|
|
// Library
|
|
StringName lib_name = p_item->get_metadata(0);
|
|
StringName lib_name = p_item->get_metadata(0);
|
|
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
|
|
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
|
|
- switch (p_button) {
|
|
|
|
|
|
+ switch (p_id) {
|
|
case LIB_BUTTON_ADD: {
|
|
case LIB_BUTTON_ADD: {
|
|
add_library_dialog->set_title(TTR("Animation Name:"));
|
|
add_library_dialog->set_title(TTR("Animation Name:"));
|
|
add_library_name->set_text("");
|
|
add_library_name->set_text("");
|
|
@@ -519,7 +519,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
|
|
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
|
|
Ref<AnimationLibrary> al = player->call("get_animation_library", lib_name);
|
|
Ref<Animation> anim = al->get_animation(anim_name);
|
|
Ref<Animation> anim = al->get_animation(anim_name);
|
|
ERR_FAIL_COND(!anim.is_valid());
|
|
ERR_FAIL_COND(!anim.is_valid());
|
|
- switch (p_button) {
|
|
|
|
|
|
+ switch (p_id) {
|
|
case ANIM_BUTTON_COPY: {
|
|
case ANIM_BUTTON_COPY: {
|
|
if (anim->get_name() == "") {
|
|
if (anim->get_name() == "") {
|
|
anim->set_name(anim_name); // Keep the name around
|
|
anim->set_name(anim_name); // Keep the name around
|