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

Add EditorStringNames singleton

This commit is contained in:
kobewi
2023-08-13 02:33:39 +02:00
parent fa3428ff25
commit 6de34fde27
176 changed files with 2549 additions and 2325 deletions

View File

@@ -35,6 +35,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/export/editor_export.h"
#include "scene/gui/check_button.h"
@@ -501,7 +502,7 @@ void ProjectSettingsEditor::_update_action_map_editor() {
List<PropertyInfo> props;
ProjectSettings::get_singleton()->get_property_list(&props);
const Ref<Texture2D> builtin_icon = get_theme_icon(SNAME("PinPressed"), SNAME("EditorIcons"));
const Ref<Texture2D> builtin_icon = get_editor_theme_icon(SNAME("PinPressed"));
for (const PropertyInfo &E : props) {
const String property_name = E.name;
@@ -533,11 +534,11 @@ void ProjectSettingsEditor::_update_action_map_editor() {
}
void ProjectSettingsEditor::_update_theme() {
search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
restart_close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
restart_close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
restart_container->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
restart_icon->set_texture(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
restart_label->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
restart_icon->set_texture(get_editor_theme_icon(SNAME("StatusWarning")));
restart_label->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
type_box->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
@@ -546,7 +547,7 @@ void ProjectSettingsEditor::_update_theme() {
continue;
}
String type = Variant::get_type_name(Variant::Type(i));
type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
type_box->add_icon_item(get_editor_theme_icon(type), type, i);
}
}