summaryrefslogtreecommitdiffstats
path: root/editor/import
diff options
context:
space:
mode:
Diffstat (limited to 'editor/import')
-rw-r--r--editor/import/audio_stream_import_settings.cpp57
-rw-r--r--editor/import/dynamic_font_import_settings.cpp23
-rw-r--r--editor/import/scene_import_settings.cpp65
3 files changed, 74 insertions, 71 deletions
diff --git a/editor/import/audio_stream_import_settings.cpp b/editor/import/audio_stream_import_settings.cpp
index 1f7fbd8c59..c77143c8ac 100644
--- a/editor/import/audio_stream_import_settings.cpp
+++ b/editor/import/audio_stream_import_settings.cpp
@@ -32,6 +32,7 @@
#include "editor/audio_stream_preview.h"
#include "editor/editor_file_system.h"
#include "editor/editor_scale.h"
+#include "editor/editor_string_names.h"
#include "scene/gui/check_box.h"
AudioStreamImportSettings *AudioStreamImportSettings::singleton = nullptr;
@@ -45,18 +46,18 @@ void AudioStreamImportSettings::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
- _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
- _stop_button->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
- _preview->set_color(get_theme_color(SNAME("dark_color_2"), SNAME("Editor")));
- color_rect->set_color(get_theme_color(SNAME("dark_color_1"), SNAME("Editor")));
- _current_label->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
- _current_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
- _duration_label->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
- _duration_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
-
- zoom_in->set_icon(get_theme_icon(SNAME("ZoomMore"), SNAME("EditorIcons")));
- zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons")));
- zoom_reset->set_icon(get_theme_icon(SNAME("ZoomReset"), SNAME("EditorIcons")));
+ _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ _preview->set_color(get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor)));
+ color_rect->set_color(get_theme_color(SNAME("dark_color_1"), EditorStringName(Editor)));
+ _current_label->add_theme_font_override("font", get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts)));
+ _current_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), EditorStringName(EditorFonts)));
+ _duration_label->add_theme_font_override("font", get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts)));
+ _duration_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), EditorStringName(EditorFonts)));
+
+ zoom_in->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ zoom_out->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ zoom_reset->set_icon(get_editor_theme_icon(SNAME("ZoomReset")));
_indicator->queue_redraw();
_preview->queue_redraw();
@@ -84,11 +85,11 @@ void AudioStreamImportSettings::_draw_preview() {
float preview_offset = zoom_bar->get_value();
float preview_len = zoom_bar->get_page();
- Ref<Font> beat_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
- int main_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
+ Ref<Font> beat_font = get_theme_font(SNAME("main"), EditorStringName(EditorFonts));
+ int main_size = get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts));
Vector<Vector2> points;
points.resize(width * 2);
- Color color_active = get_theme_color(SNAME("contrast_color_2"), SNAME("Editor"));
+ Color color_active = get_theme_color(SNAME("contrast_color_2"), EditorStringName(Editor));
Color color_inactive = color_active;
color_inactive.a *= 0.5;
Vector<Color> colors;
@@ -226,25 +227,25 @@ void AudioStreamImportSettings::_play() {
// '_pausing' variable indicates that we want to pause the audio player, not stop it. See '_on_finished()'.
_pausing = true;
_player->stop();
- _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
} else {
_player->play(_current);
- _play_button->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
+ _play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
set_process(true);
}
}
void AudioStreamImportSettings::_stop() {
_player->stop();
- _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
_current = 0;
_indicator->queue_redraw();
set_process(false);
}
void AudioStreamImportSettings::_on_finished() {
- _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
if (!_pausing) {
_current = 0;
_indicator->queue_redraw();
@@ -261,8 +262,8 @@ void AudioStreamImportSettings::_draw_indicator() {
Rect2 rect = _preview->get_rect();
- Ref<Font> beat_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
- int main_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
+ Ref<Font> beat_font = get_theme_font(SNAME("main"), EditorStringName(EditorFonts));
+ int main_size = get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts));
if (stream->get_bpm() > 0) {
int y_ofs = beat_font->get_height(main_size) + 4 * EDSCALE;
@@ -275,11 +276,11 @@ void AudioStreamImportSettings::_draw_indicator() {
return;
}
- const Color color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color color = get_theme_color(SNAME("accent_color"), EditorStringName(Editor));
_indicator->draw_line(Point2(ofs_x, rect.position.y), Point2(ofs_x, rect.position.y + rect.size.height), color, Math::round(2 * EDSCALE));
_indicator->draw_texture(
- get_theme_icon(SNAME("TimelineIndicator"), SNAME("EditorIcons")),
- Point2(ofs_x - get_theme_icon(SNAME("TimelineIndicator"), SNAME("EditorIcons"))->get_width() * 0.5, rect.position.y),
+ get_editor_theme_icon(SNAME("TimelineIndicator")),
+ Point2(ofs_x - get_editor_theme_icon(SNAME("TimelineIndicator"))->get_width() * 0.5, rect.position.y),
color);
if (stream->get_bpm() > 0 && _hovering_beat != -1) {
@@ -316,8 +317,8 @@ void AudioStreamImportSettings::_on_input_indicator(Ref<InputEvent> p_event) {
const Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) {
if (stream->get_bpm() > 0) {
- int main_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
- Ref<Font> beat_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
+ int main_size = get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts));
+ Ref<Font> beat_font = get_theme_font(SNAME("main"), EditorStringName(EditorFonts));
int y_ofs = beat_font->get_height(main_size) + 4 * EDSCALE;
if ((!_dragging && mb->get_position().y < y_ofs) || _beat_len_dragging) {
if (mb->is_pressed()) {
@@ -345,8 +346,8 @@ void AudioStreamImportSettings::_on_input_indicator(Ref<InputEvent> p_event) {
_set_beat_len_to(mm->get_position().x);
}
if (stream->get_bpm() > 0) {
- int main_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
- Ref<Font> beat_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
+ int main_size = get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts));
+ Ref<Font> beat_font = get_theme_font(SNAME("main"), EditorStringName(EditorFonts));
int y_ofs = beat_font->get_height(main_size) + 4 * EDSCALE;
if (mm->get_position().y < y_ofs) {
int new_hovering_beat = _get_beat_at_pos(mm->get_position().x);
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index 1ee795f7d8..8a385aaf82 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_string_names.h"
#include "editor/gui/editor_file_dialog.h"
/*************************************************************************/
@@ -499,7 +500,7 @@ void DynamicFontImportSettings::_variation_add() {
vars_item->set_text(0, TTR("New Configuration"));
vars_item->set_editable(0, true);
- vars_item->add_button(1, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->add_button(1, get_editor_theme_icon(SNAME("Remove")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
Ref<DynamicFontImportSettingsData> import_variation_data;
@@ -726,8 +727,8 @@ void DynamicFontImportSettings::_glyph_selected() {
TreeItem *item = glyph_table->get_selected();
ERR_FAIL_NULL(item);
- Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor"));
- Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), SNAME("Editor"));
+ Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), EditorStringName(Editor));
+ Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), EditorStringName(Editor));
scol.a = 1.f;
int32_t c = item->get_metadata(glyph_table->get_selected_column());
@@ -798,8 +799,8 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) {
TreeItem *root = glyph_table->create_item();
ERR_FAIL_NULL(root);
- Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor"));
- Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), SNAME("Editor"));
+ Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), EditorStringName(Editor));
+ Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), EditorStringName(Editor));
scol.a = 1.f;
TreeItem *item = nullptr;
@@ -814,7 +815,7 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) {
item->set_text(0, _pad_zeros(String::num_int64(c, 16)));
item->set_text_alignment(0, HORIZONTAL_ALIGNMENT_LEFT);
item->set_selectable(0, false);
- item->set_custom_bg_color(0, glyph_table->get_theme_color(SNAME("dark_color_3"), SNAME("Editor")));
+ item->set_custom_bg_color(0, glyph_table->get_theme_color(SNAME("dark_color_3"), EditorStringName(Editor)));
}
if (font_main->has_char(c)) {
item->set_text(col + 1, String::chr(c));
@@ -827,7 +828,7 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) {
item->clear_custom_bg_color(col + 1);
}
} else {
- item->set_custom_bg_color(col + 1, glyph_table->get_theme_color(SNAME("dark_color_2"), SNAME("Editor")));
+ item->set_custom_bg_color(col + 1, glyph_table->get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor)));
}
item->set_metadata(col + 1, c);
item->set_text_alignment(col + 1, HORIZONTAL_ALIGNMENT_CENTER);
@@ -925,8 +926,8 @@ void DynamicFontImportSettings::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- add_var->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
- label_warn->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
+ add_var->set_icon(get_editor_theme_icon(SNAME("Add")));
+ label_warn->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
} break;
}
}
@@ -1082,7 +1083,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
}
font_preview_label->set_text(sample);
- Ref<Font> bold_font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ Ref<Font> bold_font = get_theme_font(SNAME("bold"), EditorStringName(EditorFonts));
if (bold_font.is_valid()) {
font_name_label->add_theme_font_override("bold_font", bold_font);
}
@@ -1159,7 +1160,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
vars_item->set_text(0, cfg_name);
vars_item->set_editable(0, true);
- vars_item->add_button(1, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->add_button(1, get_editor_theme_icon(SNAME("Remove")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
Ref<DynamicFontImportSettingsData> import_variation_data_custom;
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index 2142ee3c10..6b42417296 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_string_names.h"
#include "editor/gui/editor_file_dialog.h"
#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/animation/animation_player.h"
@@ -170,7 +171,7 @@ void SceneImportSettings::_fill_material(Tree *p_tree, const Ref<Material> &p_ma
MaterialData &material_data = material_map[import_id];
ERR_FAIL_COND(p_material != material_data.material);
- Ref<Texture2D> icon = get_theme_icon(SNAME("StandardMaterial3D"), SNAME("EditorIcons"));
+ Ref<Texture2D> icon = get_editor_theme_icon(SNAME("StandardMaterial3D"));
TreeItem *item = p_tree->create_item(p_parent);
if (p_material->get_name().is_empty()) {
@@ -224,7 +225,7 @@ void SceneImportSettings::_fill_mesh(Tree *p_tree, const Ref<Mesh> &p_mesh, Tree
MeshData &mesh_data = mesh_map[import_id];
- Ref<Texture2D> icon = get_theme_icon(SNAME("Mesh"), SNAME("EditorIcons"));
+ Ref<Texture2D> icon = get_editor_theme_icon(SNAME("Mesh"));
TreeItem *item = p_tree->create_item(p_parent);
item->set_text(0, p_mesh->get_name());
@@ -274,7 +275,7 @@ void SceneImportSettings::_fill_animation(Tree *p_tree, const Ref<Animation> &p_
AnimationData &animation_data = animation_map[p_name];
- Ref<Texture2D> icon = get_theme_icon(SNAME("Animation"), SNAME("EditorIcons"));
+ Ref<Texture2D> icon = get_editor_theme_icon(SNAME("Animation"));
TreeItem *item = p_tree->create_item(p_parent);
item->set_text(0, p_name);
@@ -318,17 +319,17 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) {
String type = p_node->get_class();
- if (!has_theme_icon(type, SNAME("EditorIcons"))) {
+ if (!has_theme_icon(type, EditorStringName(EditorIcons))) {
type = "Node3D";
}
- Ref<Texture2D> icon = get_theme_icon(type, SNAME("EditorIcons"));
+ Ref<Texture2D> icon = get_editor_theme_icon(type);
TreeItem *item = scene_tree->create_item(p_parent_item);
item->set_text(0, p_node->get_name());
if (p_node == scene) {
- icon = get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons"));
+ icon = get_editor_theme_icon(SNAME("PackedScene"));
item->set_text(0, TTR("Scene"));
}
@@ -886,11 +887,11 @@ void SceneImportSettings::_play_animation() {
if (animation_player->has_animation(id)) {
if (animation_player->is_playing()) {
animation_player->pause();
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
} else {
animation_player->play(id);
- animation_play_button->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
set_process(true);
}
}
@@ -899,7 +900,7 @@ void SceneImportSettings::_play_animation() {
void SceneImportSettings::_stop_current_animation() {
animation_pingpong = false;
animation_player->stop();
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_slider->set_value_no_signal(0.0);
set_process(false);
}
@@ -911,7 +912,7 @@ void SceneImportSettings::_reset_animation(const String &p_animation_name) {
if (animation_player != nullptr && animation_player->is_playing()) {
animation_player->stop();
}
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
_reset_bone_transforms();
set_process(false);
@@ -933,7 +934,7 @@ void SceneImportSettings::_reset_animation(const String &p_animation_name) {
animation_player->play(p_animation_name);
} else {
animation_player->stop(true);
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_player->set_assigned_animation(p_animation_name);
animation_player->seek(0.0, true);
animation_slider->set_value_no_signal(0.0);
@@ -948,7 +949,7 @@ void SceneImportSettings::_animation_slider_value_changed(double p_value) {
}
if (animation_player->is_playing()) {
animation_player->stop();
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
}
animation_player->seek(p_value * animation_map[selected_id].animation->get_length(), true);
@@ -959,7 +960,7 @@ void SceneImportSettings::_animation_finished(const StringName &p_name) {
switch (loop_mode) {
case Animation::LOOP_NONE: {
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_slider->set_value_no_signal(1.0);
set_process(false);
} break;
@@ -1145,11 +1146,11 @@ void SceneImportSettings::_notification(int p_what) {
action_menu->add_theme_style_override("pressed", get_theme_stylebox("pressed", "Button"));
if (animation_player != nullptr && animation_player->is_playing()) {
- animation_play_button->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
} else {
- animation_play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
}
- animation_stop_button->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
+ animation_stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
} break;
case NOTIFICATION_PROCESS: {
@@ -1193,11 +1194,11 @@ void SceneImportSettings::_save_path_changed(const String &p_path) {
if (FileAccess::exists(p_path)) {
save_path_item->set_text(2, TTR("Warning: File exists"));
save_path_item->set_tooltip_text(2, TTR("Existing file with the same name will be replaced."));
- save_path_item->set_icon(2, get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
+ save_path_item->set_icon(2, get_editor_theme_icon(SNAME("StatusWarning")));
} else {
save_path_item->set_text(2, TTR("Will create new file"));
- save_path_item->set_icon(2, get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")));
+ save_path_item->set_icon(2, get_editor_theme_icon(SNAME("StatusSuccess")));
}
}
@@ -1231,7 +1232,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
String name = md.material_node->get_text(0);
item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- item->set_icon(0, get_theme_icon(SNAME("StandardMaterial3D"), SNAME("EditorIcons")));
+ item->set_icon(0, get_editor_theme_icon(SNAME("StandardMaterial3D")));
item->set_text(0, name);
if (md.has_import_id) {
@@ -1253,20 +1254,20 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
if (FileAccess::exists(path)) {
item->set_text(2, TTR("Warning: File exists"));
item->set_tooltip_text(2, TTR("Existing file with the same name will be replaced."));
- item->set_icon(2, get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusWarning")));
} else {
item->set_text(2, TTR("Will create new file"));
- item->set_icon(2, get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusSuccess")));
}
- item->add_button(1, get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
+ item->add_button(1, get_editor_theme_icon(SNAME("Folder")));
}
} else {
item->set_text(2, TTR("No import ID"));
item->set_tooltip_text(2, TTR("Material has no name nor any other way to identify on re-import.\nPlease name it or ensure it is exported with an unique ID."));
- item->set_icon(2, get_theme_icon(SNAME("StatusError"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusError")));
}
save_path_items.push_back(item);
@@ -1284,7 +1285,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
String name = md.mesh_node->get_text(0);
item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- item->set_icon(0, get_theme_icon(SNAME("Mesh"), SNAME("EditorIcons")));
+ item->set_icon(0, get_editor_theme_icon(SNAME("Mesh")));
item->set_text(0, name);
if (md.has_import_id) {
@@ -1306,20 +1307,20 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
if (FileAccess::exists(path)) {
item->set_text(2, TTR("Warning: File exists"));
item->set_tooltip_text(2, TTR("Existing file with the same name will be replaced on import."));
- item->set_icon(2, get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusWarning")));
} else {
item->set_text(2, TTR("Will save to new file"));
- item->set_icon(2, get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusSuccess")));
}
- item->add_button(1, get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
+ item->add_button(1, get_editor_theme_icon(SNAME("Folder")));
}
} else {
item->set_text(2, TTR("No import ID"));
item->set_tooltip_text(2, TTR("Mesh has no name nor any other way to identify on re-import.\nPlease name it or ensure it is exported with an unique ID."));
- item->set_icon(2, get_theme_icon(SNAME("StatusError"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusError")));
}
save_path_items.push_back(item);
@@ -1337,7 +1338,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
String name = ad.scene_node->get_text(0);
item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- item->set_icon(0, get_theme_icon(SNAME("Animation"), SNAME("EditorIcons")));
+ item->set_icon(0, get_editor_theme_icon(SNAME("Animation")));
item->set_text(0, name);
if (ad.settings.has("save_to_file/enabled") && bool(ad.settings["save_to_file/enabled"])) {
@@ -1358,14 +1359,14 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
if (FileAccess::exists(path)) {
item->set_text(2, TTR("Warning: File exists"));
item->set_tooltip_text(2, TTR("Existing file with the same name will be replaced on import."));
- item->set_icon(2, get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusWarning")));
} else {
item->set_text(2, TTR("Will save to new file"));
- item->set_icon(2, get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")));
+ item->set_icon(2, get_editor_theme_icon(SNAME("StatusSuccess")));
}
- item->add_button(1, get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
+ item->add_button(1, get_editor_theme_icon(SNAME("Folder")));
}
save_path_items.push_back(item);