1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Add a constant StringName for RESET animation

This commit is contained in:
kobewi
2021-12-06 01:46:03 +01:00
parent 97034939fe
commit 9cb66cac2d
5 changed files with 15 additions and 11 deletions

View File

@@ -42,6 +42,7 @@
#include "editor/plugins/node_3d_editor_plugin.h" // For onion skinning.
#include "scene/main/window.h"
#include "scene/resources/animation.h"
#include "scene/scene_string_names.h"
#include "servers/rendering_server.h"
void AnimationPlayerEditor::_node_removed(Node *p_node) {
@@ -836,12 +837,12 @@ void AnimationPlayerEditor::_update_player() {
for (const StringName &E : animlist) {
Ref<Texture2D> icon;
if (E == player->get_autoplay()) {
if (E == "RESET") {
if (E == SceneStringNames::get_singleton()->RESET) {
icon = autoplay_reset_icon;
} else {
icon = autoplay_icon;
}
} else if (E == "RESET") {
} else if (E == SceneStringNames::get_singleton()->RESET) {
icon = reset_icon;
}
animation->add_icon_item(icon, E);