You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add EditorStringNames singleton
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "editor/gui/editor_file_dialog.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
@@ -204,7 +205,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
node->add_child(memnew(HSeparator));
|
||||
Button *open_in_editor = memnew(Button);
|
||||
open_in_editor->set_text(TTR("Open Editor"));
|
||||
open_in_editor->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
|
||||
open_in_editor->set_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
node->add_child(open_in_editor);
|
||||
open_in_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor).bind(E), CONNECT_DEFERRED);
|
||||
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
|
||||
@@ -218,7 +219,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
} else {
|
||||
inspect_filters->set_text(TTR("Edit Filters"));
|
||||
}
|
||||
inspect_filters->set_icon(get_theme_icon(SNAME("AnimationFilter"), SNAME("EditorIcons")));
|
||||
inspect_filters->set_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
|
||||
node->add_child(inspect_filters);
|
||||
inspect_filters->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_inspect_filters).bind(E), CONNECT_DEFERRED);
|
||||
inspect_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
|
||||
@@ -228,7 +229,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
||||
if (anim.is_valid()) {
|
||||
MenuButton *mb = memnew(MenuButton);
|
||||
mb->set_text(anim->get_animation());
|
||||
mb->set_icon(get_theme_icon(SNAME("Animation"), SNAME("EditorIcons")));
|
||||
mb->set_icon(get_editor_theme_icon(SNAME("Animation")));
|
||||
mb->set_disabled(read_only);
|
||||
Array options;
|
||||
|
||||
@@ -747,7 +748,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
|
||||
ti->set_text(0, F->get());
|
||||
ti->set_selectable(0, false);
|
||||
ti->set_editable(0, false);
|
||||
ti->set_icon(0, get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons")));
|
||||
ti->set_icon(0, get_editor_theme_icon(SNAME("BoneAttachment3D")));
|
||||
} else {
|
||||
ti = parenthood[accum];
|
||||
}
|
||||
@@ -758,7 +759,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
|
||||
ti->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
|
||||
ti->set_text(0, concat);
|
||||
ti->set_checked(0, anode->is_path_filtered(path));
|
||||
ti->set_icon(0, get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons")));
|
||||
ti->set_icon(0, get_editor_theme_icon(SNAME("BoneAttachment3D")));
|
||||
ti->set_metadata(0, path);
|
||||
|
||||
} else {
|
||||
@@ -828,7 +829,7 @@ void AnimationNodeBlendTreeEditor::_update_editor_settings() {
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_update_theme() {
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_notification(int p_what) {
|
||||
|
||||
Reference in New Issue
Block a user