Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
This commit is contained in:
parent
6e11fcb92c
commit
8ecc0c4f47
55 changed files with 227 additions and 190 deletions
|
@ -109,6 +109,13 @@
|
||||||
Returns the editor's [EditorSettings] instance.
|
Returns the editor's [EditorSettings] instance.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_editor_theme" qualifiers="const">
|
||||||
|
<return type="Theme" />
|
||||||
|
<description>
|
||||||
|
Returns the editor's [Theme].
|
||||||
|
[b]Note:[/b] When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the [code]get_theme_*[/code] methods.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="get_file_system_dock" qualifiers="const">
|
<method name="get_file_system_dock" qualifiers="const">
|
||||||
<return type="FileSystemDock" />
|
<return type="FileSystemDock" />
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -246,7 +246,7 @@
|
||||||
# You can use a custom icon:
|
# You can use a custom icon:
|
||||||
return preload("res://addons/my_plugin/my_plugin_icon.svg")
|
return preload("res://addons/my_plugin/my_plugin_icon.svg")
|
||||||
# Or use a built-in icon:
|
# Or use a built-in icon:
|
||||||
return EditorInterface.get_base_control().get_theme_icon("Node", "EditorIcons")
|
return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
public override Texture2D _GetPluginIcon()
|
public override Texture2D _GetPluginIcon()
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
// You can use a custom icon:
|
// You can use a custom icon:
|
||||||
return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
|
return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
|
||||||
// Or use a built-in icon:
|
// Or use a built-in icon:
|
||||||
return EditorInterface.Singleton.GetBaseControl().GetThemeIcon("Node", "EditorIcons");
|
return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
|
||||||
}
|
}
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
|
@ -354,7 +354,7 @@
|
||||||
return "My Super Cool Plugin 3000"
|
return "My Super Cool Plugin 3000"
|
||||||
|
|
||||||
func _get_plugin_icon():
|
func _get_plugin_icon():
|
||||||
return EditorInterface.get_base_control().get_theme_icon("Node", "EditorIcons")
|
return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
@ -454,16 +454,10 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDialog::_update_theme() {
|
|
||||||
search_box->set_right_icon(search_options->get_editor_theme_icon(SNAME("Search")));
|
|
||||||
favorite->set_icon(search_options->get_editor_theme_icon(SNAME("Favorites")));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateDialog::_notification(int p_what) {
|
void CreateDialog::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
|
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
|
||||||
_update_theme();
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_EXIT_TREE: {
|
case NOTIFICATION_EXIT_TREE: {
|
||||||
|
@ -485,7 +479,8 @@ void CreateDialog::_notification(int p_what) {
|
||||||
favorites->add_theme_constant_override("icon_max_width", icon_width);
|
favorites->add_theme_constant_override("icon_max_width", icon_width);
|
||||||
recent->set_fixed_icon_size(Size2(icon_width, icon_width));
|
recent->set_fixed_icon_size(Size2(icon_width, icon_width));
|
||||||
|
|
||||||
_update_theme();
|
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
|
||||||
|
favorite->set_icon(get_editor_theme_icon(SNAME("Favorites")));
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,8 +102,6 @@ class CreateDialog : public ConfirmationDialog {
|
||||||
bool _is_class_disabled_by_feature_profile(const StringName &p_class) const;
|
bool _is_class_disabled_by_feature_profile(const StringName &p_class) const;
|
||||||
void _load_favorites_and_history();
|
void _load_favorites_and_history();
|
||||||
|
|
||||||
void _update_theme();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
|
@ -63,8 +63,8 @@ EditorDebuggerNode::EditorDebuggerNode() {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
|
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
|
||||||
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
|
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
|
||||||
|
|
||||||
tabs = memnew(TabContainer);
|
tabs = memnew(TabContainer);
|
||||||
tabs->set_tabs_visible(false);
|
tabs->set_tabs_visible(false);
|
||||||
|
@ -119,7 +119,7 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
|
||||||
if (tabs->get_tab_count() > 1) {
|
if (tabs->get_tab_count() > 1) {
|
||||||
node->clear_style();
|
node->clear_style();
|
||||||
tabs->set_tabs_visible(true);
|
tabs->set_tabs_visible(true);
|
||||||
tabs->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
|
tabs->add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!debugger_plugins.is_empty()) {
|
if (!debugger_plugins.is_empty()) {
|
||||||
|
@ -284,10 +284,10 @@ void EditorDebuggerNode::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||||
if (tabs->get_tab_count() > 1) {
|
if (tabs->get_tab_count() > 1) {
|
||||||
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
|
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
|
||||||
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
|
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
|
||||||
|
|
||||||
tabs->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
|
tabs->add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|
|
@ -882,7 +882,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
|
||||||
error_message = memnew(Label);
|
error_message = memnew(Label);
|
||||||
error_message->hide();
|
error_message->hide();
|
||||||
error_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
error_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||||
error_message->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
error_message->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||||
add_child(error_message);
|
add_child(error_message);
|
||||||
|
|
||||||
Label *l = memnew(Label);
|
Label *l = memnew(Label);
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/control.h"
|
#include "scene/gui/control.h"
|
||||||
#include "scene/main/window.h"
|
#include "scene/main/window.h"
|
||||||
|
#include "scene/resources/theme.h"
|
||||||
|
|
||||||
EditorInterface *EditorInterface::singleton = nullptr;
|
EditorInterface *EditorInterface::singleton = nullptr;
|
||||||
|
|
||||||
|
@ -196,6 +197,10 @@ bool EditorInterface::is_plugin_enabled(const String &p_plugin) const {
|
||||||
|
|
||||||
// Editor GUI.
|
// Editor GUI.
|
||||||
|
|
||||||
|
Ref<Theme> EditorInterface::get_editor_theme() const {
|
||||||
|
return EditorNode::get_singleton()->get_editor_theme();
|
||||||
|
}
|
||||||
|
|
||||||
Control *EditorInterface::get_base_control() const {
|
Control *EditorInterface::get_base_control() const {
|
||||||
return EditorNode::get_singleton()->get_gui_base();
|
return EditorNode::get_singleton()->get_gui_base();
|
||||||
}
|
}
|
||||||
|
@ -405,6 +410,7 @@ void EditorInterface::_bind_methods() {
|
||||||
|
|
||||||
// Editor GUI.
|
// Editor GUI.
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_editor_theme"), &EditorInterface::get_editor_theme);
|
||||||
ClassDB::bind_method(D_METHOD("get_base_control"), &EditorInterface::get_base_control);
|
ClassDB::bind_method(D_METHOD("get_base_control"), &EditorInterface::get_base_control);
|
||||||
ClassDB::bind_method(D_METHOD("get_editor_main_screen"), &EditorInterface::get_editor_main_screen);
|
ClassDB::bind_method(D_METHOD("get_editor_main_screen"), &EditorInterface::get_editor_main_screen);
|
||||||
ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor);
|
ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor);
|
||||||
|
|
|
@ -50,6 +50,7 @@ class Mesh;
|
||||||
class Node;
|
class Node;
|
||||||
class ScriptEditor;
|
class ScriptEditor;
|
||||||
class Texture2D;
|
class Texture2D;
|
||||||
|
class Theme;
|
||||||
class VBoxContainer;
|
class VBoxContainer;
|
||||||
class Window;
|
class Window;
|
||||||
|
|
||||||
|
@ -84,11 +85,10 @@ public:
|
||||||
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
|
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
|
||||||
bool is_plugin_enabled(const String &p_plugin) const;
|
bool is_plugin_enabled(const String &p_plugin) const;
|
||||||
|
|
||||||
void add_editor_plugin(EditorPlugin *p_plugin);
|
|
||||||
void remove_editor_plugin(EditorPlugin *p_plugin);
|
|
||||||
|
|
||||||
// Editor GUI.
|
// Editor GUI.
|
||||||
|
|
||||||
|
Ref<Theme> get_editor_theme() const;
|
||||||
|
|
||||||
Control *get_base_control() const;
|
Control *get_base_control() const;
|
||||||
VBoxContainer *get_editor_main_screen() const;
|
VBoxContainer *get_editor_main_screen() const;
|
||||||
ScriptEditor *get_script_editor() const;
|
ScriptEditor *get_script_editor() const;
|
||||||
|
|
|
@ -493,7 +493,6 @@ void EditorNode::_update_theme(bool p_skip_creation) {
|
||||||
scene_root_parent->add_theme_style_override("panel", theme->get_stylebox(SNAME("Content"), EditorStringName(EditorStyles)));
|
scene_root_parent->add_theme_style_override("panel", theme->get_stylebox(SNAME("Content"), EditorStringName(EditorStyles)));
|
||||||
bottom_panel->add_theme_style_override("panel", theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)));
|
bottom_panel->add_theme_style_override("panel", theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)));
|
||||||
main_menu->add_theme_style_override("hover", theme->get_stylebox(SNAME("MenuHover"), EditorStringName(EditorStyles)));
|
main_menu->add_theme_style_override("hover", theme->get_stylebox(SNAME("MenuHover"), EditorStringName(EditorStyles)));
|
||||||
prev_scene->set_icon(theme->get_icon(SNAME("PrevScene"), EditorStringName(EditorIcons)));
|
|
||||||
distraction_free->set_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
|
distraction_free->set_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
|
||||||
bottom_panel_raise->set_icon(theme->get_icon(SNAME("ExpandBottomDock"), EditorStringName(EditorIcons)));
|
bottom_panel_raise->set_icon(theme->get_icon(SNAME("ExpandBottomDock"), EditorStringName(EditorIcons)));
|
||||||
|
|
||||||
|
@ -3782,7 +3781,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
||||||
editor_folding.save_scene_folding(new_scene, lpath);
|
editor_folding.save_scene_folding(new_scene, lpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
prev_scene->set_disabled(previous_scenes.size() == 0);
|
|
||||||
opening_prev = false;
|
opening_prev = false;
|
||||||
|
|
||||||
EditorDebuggerNode::get_singleton()->update_live_edit_root();
|
EditorDebuggerNode::get_singleton()->update_live_edit_root();
|
||||||
|
@ -7153,15 +7151,6 @@ EditorNode::EditorNode() {
|
||||||
main_menu->add_child(file_menu);
|
main_menu->add_child(file_menu);
|
||||||
main_menu->set_menu_tooltip(0, TTR("Operations with scene files."));
|
main_menu->set_menu_tooltip(0, TTR("Operations with scene files."));
|
||||||
|
|
||||||
prev_scene = memnew(Button);
|
|
||||||
prev_scene->set_flat(true);
|
|
||||||
prev_scene->set_tooltip_text(TTR("Go to previously opened scene."));
|
|
||||||
prev_scene->set_disabled(true);
|
|
||||||
prev_scene->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(FILE_OPEN_PREV));
|
|
||||||
gui_base->add_child(prev_scene);
|
|
||||||
prev_scene->set_position(Point2(3, 24));
|
|
||||||
prev_scene->hide();
|
|
||||||
|
|
||||||
accept = memnew(AcceptDialog);
|
accept = memnew(AcceptDialog);
|
||||||
accept->set_unparent_when_invisible(true);
|
accept->set_unparent_when_invisible(true);
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,6 @@ private:
|
||||||
PopupMenu *tool_menu = nullptr;
|
PopupMenu *tool_menu = nullptr;
|
||||||
PopupMenu *export_as_menu = nullptr;
|
PopupMenu *export_as_menu = nullptr;
|
||||||
Button *export_button = nullptr;
|
Button *export_button = nullptr;
|
||||||
Button *prev_scene = nullptr;
|
|
||||||
Button *search_button = nullptr;
|
Button *search_button = nullptr;
|
||||||
TextureProgressBar *audio_vu = nullptr;
|
TextureProgressBar *audio_vu = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -73,12 +73,12 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
|
||||||
p_log->add_text(" - ");
|
p_log->add_text(" - ");
|
||||||
if (p_err == OK) {
|
if (p_err == OK) {
|
||||||
if (get_worst_message_type() >= EditorExportPlatform::EXPORT_MESSAGE_WARNING) {
|
if (get_worst_message_type() >= EditorExportPlatform::EXPORT_MESSAGE_WARNING) {
|
||||||
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusWarning")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
p_log->add_image(p_log->get_editor_theme_icon(SNAME("StatusWarning")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
||||||
p_log->add_text(" ");
|
p_log->add_text(" ");
|
||||||
p_log->add_text(TTR("Completed with warnings."));
|
p_log->add_text(TTR("Completed with warnings."));
|
||||||
has_messages = true;
|
has_messages = true;
|
||||||
} else {
|
} else {
|
||||||
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusSuccess")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
p_log->add_image(p_log->get_editor_theme_icon(SNAME("StatusSuccess")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
||||||
p_log->add_text(" ");
|
p_log->add_text(" ");
|
||||||
p_log->add_text(TTR("Completed successfully."));
|
p_log->add_text(TTR("Completed successfully."));
|
||||||
if (msg_count > 0) {
|
if (msg_count > 0) {
|
||||||
|
@ -86,7 +86,7 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusError")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
p_log->add_image(p_log->get_editor_theme_icon(SNAME("StatusError")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
|
||||||
p_log->add_text(" ");
|
p_log->add_text(" ");
|
||||||
p_log->add_text(TTR("Failed."));
|
p_log->add_text(TTR("Failed."));
|
||||||
has_messages = true;
|
has_messages = true;
|
||||||
|
@ -99,20 +99,20 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
|
||||||
p_log->set_table_column_expand(1, true);
|
p_log->set_table_column_expand(1, true);
|
||||||
for (int m = 0; m < msg_count; m++) {
|
for (int m = 0; m < msg_count; m++) {
|
||||||
EditorExportPlatform::ExportMessage msg = get_message(m);
|
EditorExportPlatform::ExportMessage msg = get_message(m);
|
||||||
Color color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("font_color"), SNAME("Label"));
|
Color color = p_log->get_theme_color(SNAME("font_color"), SNAME("Label"));
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
|
|
||||||
switch (msg.msg_type) {
|
switch (msg.msg_type) {
|
||||||
case EditorExportPlatform::EXPORT_MESSAGE_INFO: {
|
case EditorExportPlatform::EXPORT_MESSAGE_INFO: {
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("font_color"), EditorStringName(Editor)) * Color(1, 1, 1, 0.6);
|
color = p_log->get_theme_color(SNAME("font_color"), EditorStringName(Editor)) * Color(1, 1, 1, 0.6);
|
||||||
} break;
|
} break;
|
||||||
case EditorExportPlatform::EXPORT_MESSAGE_WARNING: {
|
case EditorExportPlatform::EXPORT_MESSAGE_WARNING: {
|
||||||
icon = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Warning"));
|
icon = p_log->get_editor_theme_icon(SNAME("Warning"));
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
|
color = p_log->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
|
||||||
} break;
|
} break;
|
||||||
case EditorExportPlatform::EXPORT_MESSAGE_ERROR: {
|
case EditorExportPlatform::EXPORT_MESSAGE_ERROR: {
|
||||||
icon = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Error"));
|
icon = p_log->get_editor_theme_icon(SNAME("Error"));
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
color = p_log->get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
||||||
} break;
|
} break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1328,7 +1328,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
script_key->connect("text_changed", callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
|
script_key->connect("text_changed", callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
|
||||||
script_key_error = memnew(Label);
|
script_key_error = memnew(Label);
|
||||||
script_key_error->set_text(String::utf8("• ") + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)"));
|
script_key_error->set_text(String::utf8("• ") + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)"));
|
||||||
script_key_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
script_key_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||||
sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key);
|
sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key);
|
||||||
sec_vb->add_child(script_key_error);
|
sec_vb->add_child(script_key_error);
|
||||||
sections->add_child(sec_vb);
|
sections->add_child(sec_vb);
|
||||||
|
@ -1413,12 +1413,12 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
export_error = memnew(Label);
|
export_error = memnew(Label);
|
||||||
main_vb->add_child(export_error);
|
main_vb->add_child(export_error);
|
||||||
export_error->hide();
|
export_error->hide();
|
||||||
export_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
export_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||||
|
|
||||||
export_warning = memnew(Label);
|
export_warning = memnew(Label);
|
||||||
main_vb->add_child(export_warning);
|
main_vb->add_child(export_warning);
|
||||||
export_warning->hide();
|
export_warning->hide();
|
||||||
export_warning->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
|
export_warning->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor)));
|
||||||
|
|
||||||
export_templates_error = memnew(HBoxContainer);
|
export_templates_error = memnew(HBoxContainer);
|
||||||
main_vb->add_child(export_templates_error);
|
main_vb->add_child(export_templates_error);
|
||||||
|
@ -1426,7 +1426,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
|
|
||||||
Label *export_error2 = memnew(Label);
|
Label *export_error2 = memnew(Label);
|
||||||
export_templates_error->add_child(export_error2);
|
export_templates_error->add_child(export_error2);
|
||||||
export_error2->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
export_error2->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||||
export_error2->set_text(String::utf8("• ") + TTR("Export templates for this platform are missing:") + " ");
|
export_error2->set_text(String::utf8("• ") + TTR("Export templates for this platform are missing:") + " ");
|
||||||
|
|
||||||
result_dialog = memnew(AcceptDialog);
|
result_dialog = memnew(AcceptDialog);
|
||||||
|
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
|
@ -709,7 +709,7 @@ ImportDock::ImportDock() {
|
||||||
content->hide();
|
content->hide();
|
||||||
|
|
||||||
imported = memnew(Label);
|
imported = memnew(Label);
|
||||||
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||||
imported->set_clip_text(true);
|
imported->set_clip_text(true);
|
||||||
content->add_child(imported);
|
content->add_child(imported);
|
||||||
HBoxContainer *hb = memnew(HBoxContainer);
|
HBoxContainer *hb = memnew(HBoxContainer);
|
||||||
|
|
|
@ -111,11 +111,11 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
||||||
|
|
||||||
get_tree()->connect("node_removed", callable_mp(this, &AnimationPlayerEditor::_node_removed));
|
get_tree()->connect("node_removed", callable_mp(this, &AnimationPlayerEditor::_node_removed));
|
||||||
|
|
||||||
add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||||
add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_TRANSLATION_CHANGED:
|
case NOTIFICATION_TRANSLATION_CHANGED:
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_scale.h"
|
#include "editor/editor_scale.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||||
#include "scene/gui/grid_container.h"
|
#include "scene/gui/grid_container.h"
|
||||||
|
@ -193,7 +194,7 @@ void EditorPropertyAnchorsPreset::setup(const Vector<String> &p_options) {
|
||||||
String preset_name = option_name.trim_prefix("Preset");
|
String preset_name = option_name.trim_prefix("Preset");
|
||||||
String humanized_name = preset_name.capitalize();
|
String humanized_name = preset_name.capitalize();
|
||||||
String icon_name = "ControlAlign" + preset_name;
|
String icon_name = "ControlAlign" + preset_name;
|
||||||
options->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(icon_name), humanized_name);
|
options->add_icon_item(EditorNode::get_singleton()->get_editor_theme()->get_icon(icon_name, EditorStringName(EditorIcons)), humanized_name);
|
||||||
} else {
|
} else {
|
||||||
options->add_item(option_name);
|
options->add_item(option_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,13 @@
|
||||||
|
|
||||||
#include "audio_listener_3d_gizmo_plugin.h"
|
#include "audio_listener_3d_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/audio_listener_3d.h"
|
#include "scene/3d/audio_listener_3d.h"
|
||||||
|
|
||||||
AudioListener3DGizmoPlugin::AudioListener3DGizmoPlugin() {
|
AudioListener3DGizmoPlugin::AudioListener3DGizmoPlugin() {
|
||||||
create_icon_material("audio_listener_3d_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoAudioListener3D")));
|
create_icon_material("audio_listener_3d_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoAudioListener3D"), EditorStringName(EditorIcons)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioListener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
bool AudioListener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include "audio_stream_player_3d_gizmo_plugin.h"
|
#include "audio_stream_player_3d_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/audio_stream_player_3d.h"
|
#include "scene/3d/audio_stream_player_3d.h"
|
||||||
|
@ -38,7 +40,7 @@
|
||||||
AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() {
|
AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() {
|
||||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
|
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
|
||||||
|
|
||||||
create_icon_material("stream_player_3d_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("Gizmo3DSamplePlayer")));
|
create_icon_material("stream_player_3d_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Gizmo3DSamplePlayer"), EditorStringName(EditorIcons)));
|
||||||
create_material("stream_player_3d_material_primary", gizmo_color);
|
create_material("stream_player_3d_material_primary", gizmo_color);
|
||||||
create_material("stream_player_3d_material_secondary", gizmo_color * Color(1, 1, 1, 0.35));
|
create_material("stream_player_3d_material_secondary", gizmo_color * Color(1, 1, 1, 0.35));
|
||||||
// Enable vertex colors for the billboard material as the gizmo color depends on the
|
// Enable vertex colors for the billboard material as the gizmo color depends on the
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/camera_3d.h"
|
#include "scene/3d/camera_3d.h"
|
||||||
|
@ -41,7 +42,7 @@ Camera3DGizmoPlugin::Camera3DGizmoPlugin() {
|
||||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
|
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
|
||||||
|
|
||||||
create_material("camera_material", gizmo_color);
|
create_material("camera_material", gizmo_color);
|
||||||
create_icon_material("camera_icon", Node3DEditor::get_singleton()->get_editor_theme_icon("GizmoCamera3D"));
|
create_icon_material("camera_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoCamera3D"), EditorStringName(EditorIcons)));
|
||||||
create_handle_material("handles");
|
create_handle_material("handles");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,13 @@
|
||||||
|
|
||||||
#include "cpu_particles_3d_gizmo_plugin.h"
|
#include "cpu_particles_3d_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/cpu_particles_3d.h"
|
#include "scene/3d/cpu_particles_3d.h"
|
||||||
|
|
||||||
CPUParticles3DGizmoPlugin::CPUParticles3DGizmoPlugin() {
|
CPUParticles3DGizmoPlugin::CPUParticles3DGizmoPlugin() {
|
||||||
create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoCPUParticles3D")));
|
create_icon_material("particles_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoCPUParticles3D"), EditorStringName(EditorIcons)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPUParticles3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
bool CPUParticles3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include "gpu_particles_3d_gizmo_plugin.h"
|
#include "gpu_particles_3d_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/gpu_particles_3d.h"
|
#include "scene/3d/gpu_particles_3d.h"
|
||||||
|
@ -40,7 +42,7 @@ GPUParticles3DGizmoPlugin::GPUParticles3DGizmoPlugin() {
|
||||||
create_material("particles_material", gizmo_color);
|
create_material("particles_material", gizmo_color);
|
||||||
gizmo_color.a = MAX((gizmo_color.a - 0.2) * 0.02, 0.0);
|
gizmo_color.a = MAX((gizmo_color.a - 0.2) * 0.02, 0.0);
|
||||||
create_material("particles_solid_material", gizmo_color);
|
create_material("particles_solid_material", gizmo_color);
|
||||||
create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoGPUParticles3D")));
|
create_icon_material("particles_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoGPUParticles3D"), EditorStringName(EditorIcons)));
|
||||||
create_handle_material("handles");
|
create_handle_material("handles");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/light_3d.h"
|
#include "scene/3d/light_3d.h"
|
||||||
|
@ -43,9 +44,9 @@ Light3DGizmoPlugin::Light3DGizmoPlugin() {
|
||||||
create_material("lines_secondary", Color(1, 1, 1, 0.35), false, false, true);
|
create_material("lines_secondary", Color(1, 1, 1, 0.35), false, false, true);
|
||||||
create_material("lines_billboard", Color(1, 1, 1), true, false, true);
|
create_material("lines_billboard", Color(1, 1, 1), true, false, true);
|
||||||
|
|
||||||
create_icon_material("light_directional_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoDirectionalLight")));
|
create_icon_material("light_directional_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoDirectionalLight"), EditorStringName(EditorIcons)));
|
||||||
create_icon_material("light_omni_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoLight")));
|
create_icon_material("light_omni_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoLight"), EditorStringName(EditorIcons)));
|
||||||
create_icon_material("light_spot_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoSpotLight")));
|
create_icon_material("light_spot_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoSpotLight"), EditorStringName(EditorIcons)));
|
||||||
|
|
||||||
create_handle_material("handles");
|
create_handle_material("handles");
|
||||||
create_handle_material("handles_billboard", true);
|
create_handle_material("handles_billboard", true);
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include "lightmap_gi_gizmo_plugin.h"
|
#include "lightmap_gi_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/lightmap_gi.h"
|
#include "scene/3d/lightmap_gi.h"
|
||||||
|
|
||||||
|
@ -48,7 +50,7 @@ LightmapGIGizmoPlugin::LightmapGIGizmoPlugin() {
|
||||||
|
|
||||||
add_material("lightmap_probe_material", mat);
|
add_material("lightmap_probe_material", mat);
|
||||||
|
|
||||||
create_icon_material("baked_indirect_light_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoLightmapGI")));
|
create_icon_material("baked_indirect_light_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoLightmapGI"), EditorStringName(EditorIcons)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LightmapGIGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
bool LightmapGIGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ Marker3DGizmoPlugin::Marker3DGizmoPlugin() {
|
||||||
// Use a darkened axis color for the negative axis.
|
// Use a darkened axis color for the negative axis.
|
||||||
// This makes it possible to see in which direction the Marker3D node is rotated
|
// This makes it possible to see in which direction the Marker3D node is rotated
|
||||||
// (which can be important depending on how it's used).
|
// (which can be important depending on how it's used).
|
||||||
const Color color_x = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("axis_x_color"), EditorStringName(Editor));
|
const Color color_x = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_x_color"), EditorStringName(Editor));
|
||||||
cursor_colors.push_back(color_x);
|
cursor_colors.push_back(color_x);
|
||||||
cursor_colors.push_back(color_x);
|
cursor_colors.push_back(color_x);
|
||||||
// FIXME: Use less strong darkening factor once GH-48573 is fixed.
|
// FIXME: Use less strong darkening factor once GH-48573 is fixed.
|
||||||
|
@ -69,13 +69,13 @@ Marker3DGizmoPlugin::Marker3DGizmoPlugin() {
|
||||||
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
|
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
|
||||||
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
|
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
|
||||||
|
|
||||||
const Color color_y = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("axis_y_color"), EditorStringName(Editor));
|
const Color color_y = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_y_color"), EditorStringName(Editor));
|
||||||
cursor_colors.push_back(color_y);
|
cursor_colors.push_back(color_y);
|
||||||
cursor_colors.push_back(color_y);
|
cursor_colors.push_back(color_y);
|
||||||
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
|
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
|
||||||
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
|
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
|
||||||
|
|
||||||
const Color color_z = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("axis_z_color"), EditorStringName(Editor));
|
const Color color_z = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_z_color"), EditorStringName(Editor));
|
||||||
cursor_colors.push_back(color_z);
|
cursor_colors.push_back(color_z);
|
||||||
cursor_colors.push_back(color_z);
|
cursor_colors.push_back(color_z);
|
||||||
cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75));
|
cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75));
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include "reflection_probe_gizmo_plugin.h"
|
#include "reflection_probe_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/reflection_probe.h"
|
#include "scene/3d/reflection_probe.h"
|
||||||
|
@ -46,7 +48,7 @@ ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() {
|
||||||
gizmo_color.a = 0.1;
|
gizmo_color.a = 0.1;
|
||||||
create_material("reflection_probe_solid_material", gizmo_color);
|
create_material("reflection_probe_solid_material", gizmo_color);
|
||||||
|
|
||||||
create_icon_material("reflection_probe_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoReflectionProbe")));
|
create_icon_material("reflection_probe_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoReflectionProbe"), EditorStringName(EditorIcons)));
|
||||||
create_handle_material("handles");
|
create_handle_material("handles");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include "voxel_gi_gizmo_plugin.h"
|
#include "voxel_gi_gizmo_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/voxel_gi.h"
|
#include "scene/3d/voxel_gi.h"
|
||||||
|
@ -47,7 +49,7 @@ VoxelGIGizmoPlugin::VoxelGIGizmoPlugin() {
|
||||||
gizmo_color.a = 0.05;
|
gizmo_color.a = 0.05;
|
||||||
create_material("voxel_gi_solid_material", gizmo_color);
|
create_material("voxel_gi_solid_material", gizmo_color);
|
||||||
|
|
||||||
create_icon_material("voxel_gi_icon", Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("GizmoVoxelGI")));
|
create_icon_material("voxel_gi_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoVoxelGI"), EditorStringName(EditorIcons)));
|
||||||
create_handle_material("handles");
|
create_handle_material("handles");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "editor/editor_interface.h"
|
#include "editor/editor_interface.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/editor_file_dialog.h"
|
#include "editor/gui/editor_file_dialog.h"
|
||||||
|
|
||||||
void GPUParticlesCollisionSDF3DEditorPlugin::_bake() {
|
void GPUParticlesCollisionSDF3DEditorPlugin::_bake() {
|
||||||
|
@ -183,7 +184,7 @@ GPUParticlesCollisionSDF3DEditorPlugin::GPUParticlesCollisionSDF3DEditorPlugin()
|
||||||
bake_hb->hide();
|
bake_hb->hide();
|
||||||
bake = memnew(Button);
|
bake = memnew(Button);
|
||||||
bake->set_flat(true);
|
bake->set_flat(true);
|
||||||
bake->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Bake")));
|
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||||
bake->set_text(TTR("Bake SDF"));
|
bake->set_text(TTR("Bake SDF"));
|
||||||
bake->connect("pressed", callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
|
bake->connect("pressed", callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
|
||||||
bake_hb->add_child(bake);
|
bake_hb->add_child(bake);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "lightmap_gi_editor_plugin.h"
|
#include "lightmap_gi_editor_plugin.h"
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/editor_file_dialog.h"
|
#include "editor/gui/editor_file_dialog.h"
|
||||||
|
|
||||||
void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
|
void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
|
||||||
|
@ -168,7 +169,9 @@ void LightmapGIEditorPlugin::_bind_methods() {
|
||||||
LightmapGIEditorPlugin::LightmapGIEditorPlugin() {
|
LightmapGIEditorPlugin::LightmapGIEditorPlugin() {
|
||||||
bake = memnew(Button);
|
bake = memnew(Button);
|
||||||
bake->set_flat(true);
|
bake->set_flat(true);
|
||||||
bake->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Bake")));
|
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
|
||||||
|
// when the editor theme updates.
|
||||||
|
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||||
bake->set_text(TTR("Bake Lightmaps"));
|
bake->set_text(TTR("Bake Lightmaps"));
|
||||||
bake->hide();
|
bake->hide();
|
||||||
bake->connect("pressed", Callable(this, "_bake"));
|
bake->connect("pressed", Callable(this, "_bake"));
|
||||||
|
|
|
@ -513,17 +513,20 @@ void MeshInstance3DEditor::_create_outline_mesh() {
|
||||||
ur->commit_action();
|
ur->commit_action();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshInstance3DEditor::_bind_methods() {
|
void MeshInstance3DEditor::_notification(int p_what) {
|
||||||
|
switch (p_what) {
|
||||||
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
|
options->set_icon(get_editor_theme_icon(SNAME("MeshInstance3D")));
|
||||||
|
} break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshInstance3DEditor::MeshInstance3DEditor() {
|
MeshInstance3DEditor::MeshInstance3DEditor() {
|
||||||
options = memnew(MenuButton);
|
options = memnew(MenuButton);
|
||||||
|
options->set_text(TTR("Mesh"));
|
||||||
options->set_switch_on_hover(true);
|
options->set_switch_on_hover(true);
|
||||||
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
|
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
|
||||||
|
|
||||||
options->set_text(TTR("Mesh"));
|
|
||||||
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MeshInstance3D")));
|
|
||||||
|
|
||||||
options->get_popup()->add_item(TTR("Create Trimesh Static Body"), MENU_OPTION_CREATE_STATIC_TRIMESH_BODY);
|
options->get_popup()->add_item(TTR("Create Trimesh Static Body"), MENU_OPTION_CREATE_STATIC_TRIMESH_BODY);
|
||||||
options->get_popup()->set_item_tooltip(-1, TTR("Creates a StaticBody3D and assigns a polygon-based collision shape to it automatically.\nThis is the most accurate (but slowest) option for collision detection."));
|
options->get_popup()->set_item_tooltip(-1, TTR("Creates a StaticBody3D and assigns a polygon-based collision shape to it automatically.\nThis is the most accurate (but slowest) option for collision detection."));
|
||||||
options->get_popup()->add_separator();
|
options->get_popup()->add_separator();
|
||||||
|
|
|
@ -79,7 +79,8 @@ class MeshInstance3DEditor : public Control {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _node_removed(Node *p_node);
|
void _node_removed(Node *p_node);
|
||||||
static void _bind_methods();
|
|
||||||
|
void _notification(int p_what);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void edit(MeshInstance3D *p_mesh);
|
void edit(MeshInstance3D *p_mesh);
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "editor/editor_interface.h"
|
#include "editor/editor_interface.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/editor_file_dialog.h"
|
#include "editor/gui/editor_file_dialog.h"
|
||||||
#include "editor/inspector_dock.h"
|
#include "editor/inspector_dock.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
|
@ -275,7 +276,7 @@ MeshLibraryEditor::MeshLibraryEditor() {
|
||||||
Node3DEditor::get_singleton()->add_control_to_menu_panel(menu);
|
Node3DEditor::get_singleton()->add_control_to_menu_panel(menu);
|
||||||
menu->set_position(Point2(1, 1));
|
menu->set_position(Point2(1, 1));
|
||||||
menu->set_text(TTR("MeshLibrary"));
|
menu->set_text(TTR("MeshLibrary"));
|
||||||
menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MeshLibrary")));
|
menu->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MeshLibrary"), EditorStringName(EditorIcons)));
|
||||||
menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
|
menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
|
||||||
menu->get_popup()->add_item(TTR("Remove Selected Item"), MENU_OPTION_REMOVE_ITEM);
|
menu->get_popup()->add_item(TTR("Remove Selected Item"), MENU_OPTION_REMOVE_ITEM);
|
||||||
menu->get_popup()->add_separator();
|
menu->get_popup()->add_separator();
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "multimesh_editor_plugin.h"
|
#include "multimesh_editor_plugin.h"
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/scene_tree_editor.h"
|
#include "editor/gui/scene_tree_editor.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/mesh_instance_3d.h"
|
#include "scene/3d/mesh_instance_3d.h"
|
||||||
|
@ -272,7 +273,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
||||||
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
|
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
|
||||||
|
|
||||||
options->set_text("MultiMesh");
|
options->set_text("MultiMesh");
|
||||||
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MultiMeshInstance3D")));
|
options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
|
||||||
|
|
||||||
options->get_popup()->add_item(TTR("Populate Surface"));
|
options->get_popup()->add_item(TTR("Populate Surface"));
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &MultiMeshEditor::_menu_option));
|
options->get_popup()->connect("id_pressed", callable_mp(this, &MultiMeshEditor::_menu_option));
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "core/os/keyboard.h"
|
#include "core/os/keyboard.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "node_3d_editor_plugin.h"
|
#include "node_3d_editor_plugin.h"
|
||||||
#include "scene/3d/camera_3d.h"
|
#include "scene/3d/camera_3d.h"
|
||||||
|
@ -554,7 +555,7 @@ NavigationObstacle3DEditor::NavigationObstacle3DEditor() {
|
||||||
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
|
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
|
||||||
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||||
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
|
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
|
||||||
Ref<Texture2D> handle = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Editor3DHandle"));
|
Ref<Texture2D> handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons));
|
||||||
handle_material->set_point_size(handle->get_width());
|
handle_material->set_point_size(handle->get_width());
|
||||||
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
|
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "core/math/geometry_3d.h"
|
#include "core/math/geometry_3d.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/resources/primitive_meshes.h"
|
#include "scene/resources/primitive_meshes.h"
|
||||||
|
|
||||||
|
@ -940,7 +941,7 @@ void EditorNode3DGizmoPlugin::create_handle_material(const String &p_name, bool
|
||||||
|
|
||||||
handle_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
|
handle_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
|
||||||
handle_material->set_flag(StandardMaterial3D::FLAG_USE_POINT_SIZE, true);
|
handle_material->set_flag(StandardMaterial3D::FLAG_USE_POINT_SIZE, true);
|
||||||
Ref<Texture2D> handle_t = p_icon != nullptr ? p_icon : Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("Editor3DHandle"));
|
Ref<Texture2D> handle_t = p_icon != nullptr ? p_icon : EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons));
|
||||||
handle_material->set_point_size(handle_t->get_width());
|
handle_material->set_point_size(handle_t->get_width());
|
||||||
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle_t);
|
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle_t);
|
||||||
handle_material->set_albedo(Color(1, 1, 1));
|
handle_material->set_albedo(Color(1, 1, 1));
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "occluder_instance_3d_editor_plugin.h"
|
#include "occluder_instance_3d_editor_plugin.h"
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/editor_file_dialog.h"
|
#include "editor/gui/editor_file_dialog.h"
|
||||||
|
|
||||||
void OccluderInstance3DEditorPlugin::_bake_select_file(const String &p_file) {
|
void OccluderInstance3DEditorPlugin::_bake_select_file(const String &p_file) {
|
||||||
|
@ -104,7 +105,7 @@ void OccluderInstance3DEditorPlugin::_bind_methods() {
|
||||||
OccluderInstance3DEditorPlugin::OccluderInstance3DEditorPlugin() {
|
OccluderInstance3DEditorPlugin::OccluderInstance3DEditorPlugin() {
|
||||||
bake = memnew(Button);
|
bake = memnew(Button);
|
||||||
bake->set_flat(true);
|
bake->set_flat(true);
|
||||||
bake->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Bake")));
|
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||||
bake->set_text(TTR("Bake Occluders"));
|
bake->set_text(TTR("Bake Occluders"));
|
||||||
bake->hide();
|
bake->hide();
|
||||||
bake->connect("pressed", Callable(this, "_bake"));
|
bake->connect("pressed", Callable(this, "_bake"));
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "core/os/keyboard.h"
|
#include "core/os/keyboard.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "node_3d_editor_plugin.h"
|
#include "node_3d_editor_plugin.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
|
@ -696,11 +697,11 @@ void Path3DEditorPlugin::_handle_option_pressed(int p_option) {
|
||||||
void Path3DEditorPlugin::_update_theme() {
|
void Path3DEditorPlugin::_update_theme() {
|
||||||
// TODO: Split the EditorPlugin instance from the UI instance and connect this properly.
|
// TODO: Split the EditorPlugin instance from the UI instance and connect this properly.
|
||||||
// See the 2D path editor for inspiration.
|
// See the 2D path editor for inspiration.
|
||||||
curve_edit->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("CurveEdit")));
|
curve_edit->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("CurveEdit"), EditorStringName(EditorIcons)));
|
||||||
curve_edit_curve->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("CurveCurve")));
|
curve_edit_curve->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("CurveCurve"), EditorStringName(EditorIcons)));
|
||||||
curve_create->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("CurveCreate")));
|
curve_create->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("CurveCreate"), EditorStringName(EditorIcons)));
|
||||||
curve_del->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("CurveDelete")));
|
curve_del->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("CurveDelete"), EditorStringName(EditorIcons)));
|
||||||
curve_close->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("CurveClose")));
|
curve_close->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("CurveClose"), EditorStringName(EditorIcons)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Path3DEditorPlugin::_notification(int p_what) {
|
void Path3DEditorPlugin::_notification(int p_what) {
|
||||||
|
@ -822,6 +823,6 @@ Path3DGizmoPlugin::Path3DGizmoPlugin() {
|
||||||
Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8));
|
Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8));
|
||||||
create_material("path_material", path_color);
|
create_material("path_material", path_color);
|
||||||
create_material("path_thin_material", Color(0.5, 0.5, 0.5));
|
create_material("path_thin_material", Color(0.5, 0.5, 0.5));
|
||||||
create_handle_material("handles", false, Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("EditorPathSmoothHandle")));
|
create_handle_material("handles", false, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("EditorPathSmoothHandle"), EditorStringName(EditorIcons)));
|
||||||
create_handle_material("sec_handles", false, Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("EditorCurveHandle")));
|
create_handle_material("sec_handles", false, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("EditorCurveHandle"), EditorStringName(EditorIcons)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
#include "physical_bone_3d_editor_plugin.h"
|
#include "physical_bone_3d_editor_plugin.h"
|
||||||
|
|
||||||
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
#include "scene/gui/separator.h"
|
#include "scene/gui/separator.h"
|
||||||
|
|
||||||
|
@ -60,7 +62,9 @@ PhysicalBone3DEditor::PhysicalBone3DEditor() {
|
||||||
spatial_editor_hb->add_child(button_transform_joint);
|
spatial_editor_hb->add_child(button_transform_joint);
|
||||||
|
|
||||||
button_transform_joint->set_text(TTR("Move Joint"));
|
button_transform_joint->set_text(TTR("Move Joint"));
|
||||||
button_transform_joint->set_icon(Node3DEditor::get_singleton()->get_editor_theme_icon(SNAME("PhysicalBone3D")));
|
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
|
||||||
|
// when the editor theme updates.
|
||||||
|
button_transform_joint->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("PhysicalBone3D"), EditorStringName(EditorIcons)));
|
||||||
button_transform_joint->set_toggle_mode(true);
|
button_transform_joint->set_toggle_mode(true);
|
||||||
button_transform_joint->connect("toggled", callable_mp(this, &PhysicalBone3DEditor::_on_toggle_button_transform_joint));
|
button_transform_joint->connect("toggled", callable_mp(this, &PhysicalBone3DEditor::_on_toggle_button_transform_joint));
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "core/os/keyboard.h"
|
#include "core/os/keyboard.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||||
|
@ -569,7 +570,7 @@ Polygon3DEditor::Polygon3DEditor() {
|
||||||
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
|
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
|
||||||
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||||
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
|
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
|
||||||
Ref<Texture2D> handle = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Editor3DHandle"));
|
Ref<Texture2D> handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons));
|
||||||
handle_material->set_point_size(handle->get_width());
|
handle_material->set_point_size(handle->get_width());
|
||||||
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
|
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
|
||||||
|
|
||||||
|
|
|
@ -3876,7 +3876,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||||
filename = memnew(Label);
|
filename = memnew(Label);
|
||||||
filename->set_clip_text(true);
|
filename->set_clip_text(true);
|
||||||
filename->set_h_size_flags(SIZE_EXPAND_FILL);
|
filename->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||||
buttons_hbox->add_child(filename);
|
buttons_hbox->add_child(filename);
|
||||||
|
|
||||||
members_overview_alphabeta_sort_button = memnew(Button);
|
members_overview_alphabeta_sort_button = memnew(Button);
|
||||||
|
|
|
@ -2124,16 +2124,16 @@ void ScriptTextEditor::_enable_code_editor() {
|
||||||
|
|
||||||
editor_box->add_child(warnings_panel);
|
editor_box->add_child(warnings_panel);
|
||||||
warnings_panel->add_theme_font_override(
|
warnings_panel->add_theme_font_override(
|
||||||
"normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), EditorStringName(EditorFonts)));
|
"normal_font", EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("main"), EditorStringName(EditorFonts)));
|
||||||
warnings_panel->add_theme_font_size_override(
|
warnings_panel->add_theme_font_size_override(
|
||||||
"normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
"normal_font_size", EditorNode::get_singleton()->get_editor_theme()->get_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
||||||
warnings_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_warning_clicked));
|
warnings_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_warning_clicked));
|
||||||
|
|
||||||
editor_box->add_child(errors_panel);
|
editor_box->add_child(errors_panel);
|
||||||
errors_panel->add_theme_font_override(
|
errors_panel->add_theme_font_override(
|
||||||
"normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), EditorStringName(EditorFonts)));
|
"normal_font", EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("main"), EditorStringName(EditorFonts)));
|
||||||
errors_panel->add_theme_font_size_override(
|
errors_panel->add_theme_font_size_override(
|
||||||
"normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
"normal_font_size", EditorNode::get_singleton()->get_editor_theme()->get_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
||||||
errors_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_error_clicked));
|
errors_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_error_clicked));
|
||||||
|
|
||||||
add_child(context_menu);
|
add_child(context_menu);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "skeleton_2d_editor_plugin.h"
|
#include "skeleton_2d_editor_plugin.h"
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/editor_undo_redo_manager.h"
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||||
#include "scene/2d/mesh_instance_2d.h"
|
#include "scene/2d/mesh_instance_2d.h"
|
||||||
|
@ -98,7 +99,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
|
||||||
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
|
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
|
||||||
|
|
||||||
options->set_text(TTR("Skeleton2D"));
|
options->set_text(TTR("Skeleton2D"));
|
||||||
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Skeleton2D")));
|
options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Skeleton2D"), EditorStringName(EditorIcons)));
|
||||||
|
|
||||||
options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_SET_REST);
|
options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_SET_REST);
|
||||||
options->get_popup()->add_separator();
|
options->get_popup()->add_separator();
|
||||||
|
|
|
@ -936,7 +936,7 @@ void fragment() {
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
handle_material->set_shader(handle_shader);
|
handle_material->set_shader(handle_shader);
|
||||||
Ref<Texture2D> handle = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("EditorBoneHandle"));
|
Ref<Texture2D> handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("EditorBoneHandle"), EditorStringName(EditorIcons));
|
||||||
handle_material->set_shader_parameter("point_size", handle->get_width());
|
handle_material->set_shader_parameter("point_size", handle->get_width());
|
||||||
handle_material->set_shader_parameter("texture_albedo", handle);
|
handle_material->set_shader_parameter("texture_albedo", handle);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "skeleton_ik_3d_editor_plugin.h"
|
#include "skeleton_ik_3d_editor_plugin.h"
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "scene/3d/skeleton_ik_3d.h"
|
#include "scene/3d/skeleton_ik_3d.h"
|
||||||
#include "scene/gui/button.h"
|
#include "scene/gui/button.h"
|
||||||
|
|
||||||
|
@ -84,7 +85,7 @@ void SkeletonIK3DEditorPlugin::_bind_methods() {
|
||||||
|
|
||||||
SkeletonIK3DEditorPlugin::SkeletonIK3DEditorPlugin() {
|
SkeletonIK3DEditorPlugin::SkeletonIK3DEditorPlugin() {
|
||||||
play_btn = memnew(Button);
|
play_btn = memnew(Button);
|
||||||
play_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Play")));
|
play_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Play"), EditorStringName(EditorIcons)));
|
||||||
play_btn->set_text(TTR("Play IK"));
|
play_btn->set_text(TTR("Play IK"));
|
||||||
play_btn->set_toggle_mode(true);
|
play_btn->set_toggle_mode(true);
|
||||||
play_btn->hide();
|
play_btn->hide();
|
||||||
|
|
|
@ -327,8 +327,8 @@ void ShaderTextEditor::_load_theme_settings() {
|
||||||
|
|
||||||
if (warnings_panel) {
|
if (warnings_panel) {
|
||||||
// Warnings panel.
|
// Warnings panel.
|
||||||
warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), EditorStringName(EditorFonts)));
|
warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("main"), EditorStringName(EditorFonts)));
|
||||||
warnings_panel->add_theme_font_size_override("normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
warnings_panel->add_theme_font_size_override("normal_font_size", EditorNode::get_singleton()->get_editor_theme()->get_font_size(SNAME("main_size"), EditorStringName(EditorFonts)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1167,7 +1167,7 @@ TextShaderEditor::TextShaderEditor() {
|
||||||
hbc->add_child(edit_menu);
|
hbc->add_child(edit_menu);
|
||||||
hbc->add_child(goto_menu);
|
hbc->add_child(goto_menu);
|
||||||
hbc->add_child(help_menu);
|
hbc->add_child(help_menu);
|
||||||
hbc->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), EditorStringName(EditorStyles)));
|
hbc->add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("ScriptEditorPanel"), EditorStringName(EditorStyles)));
|
||||||
|
|
||||||
VSplitContainer *editor_box = memnew(VSplitContainer);
|
VSplitContainer *editor_box = memnew(VSplitContainer);
|
||||||
main_container->add_child(editor_box);
|
main_container->add_child(editor_box);
|
||||||
|
|
|
@ -3548,7 +3548,7 @@ void ThemeEditor::_add_preview_tab(ThemeEditorPreview *p_preview_tab, const Stri
|
||||||
|
|
||||||
preview_tabs->add_tab(p_preview_name, p_icon);
|
preview_tabs->add_tab(p_preview_name, p_icon);
|
||||||
preview_tabs_content->add_child(p_preview_tab);
|
preview_tabs_content->add_child(p_preview_tab);
|
||||||
preview_tabs->set_tab_button_icon(preview_tabs->get_tab_count() - 1, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("close"), SNAME("TabBar")));
|
preview_tabs->set_tab_button_icon(preview_tabs->get_tab_count() - 1, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("close"), SNAME("TabBar")));
|
||||||
p_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked));
|
p_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked));
|
||||||
|
|
||||||
preview_tabs->set_current_tab(preview_tabs->get_tab_count() - 1);
|
preview_tabs->set_current_tab(preview_tabs->get_tab_count() - 1);
|
||||||
|
|
|
@ -217,7 +217,7 @@ void ThemeEditorPreview::_notification(int p_what) {
|
||||||
theme_cache.preview_picker_overlay_color = get_theme_color(SNAME("preview_picker_overlay_color"), SNAME("ThemeEditor"));
|
theme_cache.preview_picker_overlay_color = get_theme_color(SNAME("preview_picker_overlay_color"), SNAME("ThemeEditor"));
|
||||||
theme_cache.preview_picker_label = get_theme_stylebox(SNAME("preview_picker_label"), SNAME("ThemeEditor"));
|
theme_cache.preview_picker_label = get_theme_stylebox(SNAME("preview_picker_label"), SNAME("ThemeEditor"));
|
||||||
theme_cache.preview_picker_font = get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts));
|
theme_cache.preview_picker_font = get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts));
|
||||||
theme_cache.font_size = get_theme_font_size(SNAME("font_size"), EditorStringName(EditorFonts));
|
theme_cache.font_size = get_theme_default_font_size();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_PROCESS: {
|
case NOTIFICATION_PROCESS: {
|
||||||
|
|
|
@ -883,10 +883,10 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||||
button_advanced_menu->get_popup()->add_item(TTR("Reset to default tile shape"), RESET_TO_DEFAULT_TILE, Key::F);
|
button_advanced_menu->get_popup()->add_item(TTR("Reset to default tile shape"), RESET_TO_DEFAULT_TILE, Key::F);
|
||||||
button_advanced_menu->get_popup()->add_item(TTR("Clear"), CLEAR_TILE, Key::C);
|
button_advanced_menu->get_popup()->add_item(TTR("Clear"), CLEAR_TILE, Key::C);
|
||||||
button_advanced_menu->get_popup()->add_separator();
|
button_advanced_menu->get_popup()->add_separator();
|
||||||
button_advanced_menu->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("RotateRight")), TTR("Rotate Right"), ROTATE_RIGHT, Key::R);
|
button_advanced_menu->get_popup()->add_item(TTR("Rotate Right"), ROTATE_RIGHT, Key::R);
|
||||||
button_advanced_menu->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("RotateLeft")), TTR("Rotate Left"), ROTATE_LEFT, Key::E);
|
button_advanced_menu->get_popup()->add_item(TTR("Rotate Left"), ROTATE_LEFT, Key::E);
|
||||||
button_advanced_menu->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("MirrorX")), TTR("Flip Horizontally"), FLIP_HORIZONTALLY, Key::H);
|
button_advanced_menu->get_popup()->add_item(TTR("Flip Horizontally"), FLIP_HORIZONTALLY, Key::H);
|
||||||
button_advanced_menu->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("MirrorY")), TTR("Flip Vertically"), FLIP_VERTICALLY, Key::V);
|
button_advanced_menu->get_popup()->add_item(TTR("Flip Vertically"), FLIP_VERTICALLY, Key::V);
|
||||||
button_advanced_menu->get_popup()->connect("id_pressed", callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
|
button_advanced_menu->get_popup()->connect("id_pressed", callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
|
||||||
button_advanced_menu->set_focus_mode(FOCUS_ALL);
|
button_advanced_menu->set_focus_mode(FOCUS_ALL);
|
||||||
toolbar->add_child(button_advanced_menu);
|
toolbar->add_child(button_advanced_menu);
|
||||||
|
@ -937,7 +937,6 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||||
root->add_child(editor_zoom_widget);
|
root->add_child(editor_zoom_widget);
|
||||||
|
|
||||||
button_center_view = memnew(Button);
|
button_center_view = memnew(Button);
|
||||||
button_center_view->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("CenterView")));
|
|
||||||
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
|
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
|
||||||
button_center_view->connect("pressed", callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
button_center_view->connect("pressed", callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
||||||
button_center_view->set_flat(true);
|
button_center_view->set_flat(true);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_scale.h"
|
#include "editor/editor_scale.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||||
|
|
||||||
#include "scene/2d/tile_map.h"
|
#include "scene/2d/tile_map.h"
|
||||||
|
@ -289,10 +290,12 @@ void TilesEditorUtils::display_tile_set_editor_panel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TilesEditorUtils::draw_selection_rect(CanvasItem *p_ci, const Rect2 &p_rect, const Color &p_color) {
|
void TilesEditorUtils::draw_selection_rect(CanvasItem *p_ci, const Rect2 &p_rect, const Color &p_color) {
|
||||||
|
Ref<Texture2D> selection_texture = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("TileSelection"), EditorStringName(EditorIcons));
|
||||||
|
|
||||||
real_t scale = p_ci->get_global_transform().get_scale().x * 0.5;
|
real_t scale = p_ci->get_global_transform().get_scale().x * 0.5;
|
||||||
p_ci->draw_set_transform(p_rect.position, 0, Vector2(1, 1) / scale);
|
p_ci->draw_set_transform(p_rect.position, 0, Vector2(1, 1) / scale);
|
||||||
RS::get_singleton()->canvas_item_add_nine_patch(
|
RS::get_singleton()->canvas_item_add_nine_patch(
|
||||||
p_ci->get_canvas_item(), Rect2(Vector2(), p_rect.size * scale), Rect2(), EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("TileSelection"))->get_rid(),
|
p_ci->get_canvas_item(), Rect2(Vector2(), p_rect.size * scale), Rect2(), selection_texture->get_rid(),
|
||||||
Vector2(2, 2), Vector2(2, 2), RS::NINE_PATCH_STRETCH, RS::NINE_PATCH_STRETCH, false, p_color);
|
Vector2(2, 2), Vector2(2, 2), RS::NINE_PATCH_STRETCH, RS::NINE_PATCH_STRETCH, false, p_color);
|
||||||
p_ci->draw_set_transform_matrix(Transform2D());
|
p_ci->draw_set_transform_matrix(Transform2D());
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ void VersionControlEditorPlugin::_update_set_up_warning(String p_new_text) {
|
||||||
set_up_ssh_passphrase->get_text().is_empty();
|
set_up_ssh_passphrase->get_text().is_empty();
|
||||||
|
|
||||||
if (empty_settings) {
|
if (empty_settings) {
|
||||||
set_up_warning_text->add_theme_color_override(SNAME("font_color"), EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
|
set_up_warning_text->add_theme_color_override(SNAME("font_color"), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor)));
|
||||||
set_up_warning_text->set_text(TTR("Remote settings are empty. VCS features that use the network may not work."));
|
set_up_warning_text->set_text(TTR("Remote settings are empty. VCS features that use the network may not work."));
|
||||||
} else {
|
} else {
|
||||||
set_up_warning_text->set_text("");
|
set_up_warning_text->set_text("");
|
||||||
|
@ -192,7 +192,7 @@ void VersionControlEditorPlugin::_refresh_branch_list() {
|
||||||
String current_branch = EditorVCSInterface::get_singleton()->get_current_branch_name();
|
String current_branch = EditorVCSInterface::get_singleton()->get_current_branch_name();
|
||||||
|
|
||||||
for (int i = 0; i < branch_list.size(); i++) {
|
for (int i = 0; i < branch_list.size(); i++) {
|
||||||
branch_select->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("VcsBranches")), branch_list[i], i);
|
branch_select->add_icon_item(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("VcsBranches"), EditorStringName(EditorIcons)), branch_list[i], i);
|
||||||
|
|
||||||
if (branch_list[i] == current_branch) {
|
if (branch_list[i] == current_branch) {
|
||||||
branch_select->select(i);
|
branch_select->select(i);
|
||||||
|
@ -252,7 +252,7 @@ void VersionControlEditorPlugin::_refresh_remote_list() {
|
||||||
remote_select->set_disabled(remotes.is_empty());
|
remote_select->set_disabled(remotes.is_empty());
|
||||||
|
|
||||||
for (int i = 0; i < remotes.size(); i++) {
|
for (int i = 0; i < remotes.size(); i++) {
|
||||||
remote_select->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("ArrowUp")), remotes[i], i);
|
remote_select->add_icon_item(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("ArrowUp"), EditorStringName(EditorIcons)), remotes[i], i);
|
||||||
remote_select->set_item_metadata(i, remotes[i]);
|
remote_select->set_item_metadata(i, remotes[i]);
|
||||||
|
|
||||||
if (remotes[i] == current_remote) {
|
if (remotes[i] == current_remote) {
|
||||||
|
@ -422,9 +422,9 @@ void VersionControlEditorPlugin::_add_new_item(Tree *p_tree, String p_file_path,
|
||||||
new_item->set_meta(SNAME("change_type"), p_change);
|
new_item->set_meta(SNAME("change_type"), p_change);
|
||||||
new_item->set_custom_color(0, change_type_to_color[p_change]);
|
new_item->set_custom_color(0, change_type_to_color[p_change]);
|
||||||
|
|
||||||
new_item->add_button(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("File")), BUTTON_TYPE_OPEN, false, TTR("Open in editor"));
|
new_item->add_button(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("File"), EditorStringName(EditorIcons)), BUTTON_TYPE_OPEN, false, TTR("Open in editor"));
|
||||||
if (p_tree == unstaged_files) {
|
if (p_tree == unstaged_files) {
|
||||||
new_item->add_button(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Close")), BUTTON_TYPE_DISCARD, false, TTR("Discard changes"));
|
new_item->add_button(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)), BUTTON_TYPE_DISCARD, false, TTR("Discard changes"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -570,8 +570,8 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) {
|
||||||
String commit_author = meta_data[SNAME("commit_author")];
|
String commit_author = meta_data[SNAME("commit_author")];
|
||||||
String commit_date_string = meta_data[SNAME("commit_date_string")];
|
String commit_date_string = meta_data[SNAME("commit_date_string")];
|
||||||
|
|
||||||
diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("doc_bold"), EditorStringName(EditorFonts)));
|
diff->push_font(EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("doc_bold"), EditorStringName(EditorFonts)));
|
||||||
diff->push_color(EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), EditorStringName(Editor)));
|
diff->push_color(EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("accent_color"), EditorStringName(Editor)));
|
||||||
diff->add_text(TTR("Commit:") + " " + commit_id);
|
diff->add_text(TTR("Commit:") + " " + commit_id);
|
||||||
diff->add_newline();
|
diff->add_newline();
|
||||||
diff->add_text(TTR("Author:") + " " + commit_author);
|
diff->add_text(TTR("Author:") + " " + commit_author);
|
||||||
|
@ -590,13 +590,13 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) {
|
||||||
for (int i = 0; i < diff_content.size(); i++) {
|
for (int i = 0; i < diff_content.size(); i++) {
|
||||||
EditorVCSInterface::DiffFile diff_file = diff_content[i];
|
EditorVCSInterface::DiffFile diff_file = diff_content[i];
|
||||||
|
|
||||||
diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("doc_bold"), EditorStringName(EditorFonts)));
|
diff->push_font(EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("doc_bold"), EditorStringName(EditorFonts)));
|
||||||
diff->push_color(EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), EditorStringName(Editor)));
|
diff->push_color(EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("accent_color"), EditorStringName(Editor)));
|
||||||
diff->add_text(TTR("File:") + " " + diff_file.new_file);
|
diff->add_text(TTR("File:") + " " + diff_file.new_file);
|
||||||
diff->pop();
|
diff->pop();
|
||||||
diff->pop();
|
diff->pop();
|
||||||
|
|
||||||
diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts)));
|
diff->push_font(EditorNode::get_singleton()->get_editor_theme()->get_font(SNAME("status_source"), EditorStringName(EditorFonts)));
|
||||||
for (int j = 0; j < diff_file.diff_hunks.size(); j++) {
|
for (int j = 0; j < diff_file.diff_hunks.size(); j++) {
|
||||||
EditorVCSInterface::DiffHunk hunk = diff_file.diff_hunks[j];
|
EditorVCSInterface::DiffHunk hunk = diff_file.diff_hunks[j];
|
||||||
|
|
||||||
|
@ -679,9 +679,9 @@ void VersionControlEditorPlugin::_display_diff_split_view(List<EditorVCSInterfac
|
||||||
EditorVCSInterface::DiffLine diff_line = parsed_diff[i];
|
EditorVCSInterface::DiffLine diff_line = parsed_diff[i];
|
||||||
|
|
||||||
bool has_change = diff_line.status != " ";
|
bool has_change = diff_line.status != " ";
|
||||||
static const Color red = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
static const Color red = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor));
|
||||||
static const Color green = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("success_color"), EditorStringName(Editor));
|
static const Color green = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("success_color"), EditorStringName(Editor));
|
||||||
static const Color white = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.6);
|
static const Color white = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.6);
|
||||||
|
|
||||||
if (diff_line.old_line_no >= 0) {
|
if (diff_line.old_line_no >= 0) {
|
||||||
diff->push_cell();
|
diff->push_cell();
|
||||||
|
@ -761,11 +761,11 @@ void VersionControlEditorPlugin::_display_diff_unified_view(List<EditorVCSInterf
|
||||||
|
|
||||||
Color color;
|
Color color;
|
||||||
if (diff_line.status == "+") {
|
if (diff_line.status == "+") {
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("success_color"), EditorStringName(Editor));
|
color = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("success_color"), EditorStringName(Editor));
|
||||||
} else if (diff_line.status == "-") {
|
} else if (diff_line.status == "-") {
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
color = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor));
|
||||||
} else {
|
} else {
|
||||||
color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("font_color"), SNAME("Label"));
|
color = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("font_color"), SNAME("Label"));
|
||||||
color *= Color(1, 1, 1, 0.6);
|
color *= Color(1, 1, 1, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -856,13 +856,13 @@ void VersionControlEditorPlugin::_popup_remote_remove_confirm(int p_index) {
|
||||||
void VersionControlEditorPlugin::_update_extra_options() {
|
void VersionControlEditorPlugin::_update_extra_options() {
|
||||||
extra_options_remove_branch_list->clear();
|
extra_options_remove_branch_list->clear();
|
||||||
for (int i = 0; i < branch_select->get_item_count(); i++) {
|
for (int i = 0; i < branch_select->get_item_count(); i++) {
|
||||||
extra_options_remove_branch_list->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("VcsBranches")), branch_select->get_item_text(branch_select->get_item_id(i)));
|
extra_options_remove_branch_list->add_icon_item(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("VcsBranches"), EditorStringName(EditorIcons)), branch_select->get_item_text(branch_select->get_item_id(i)));
|
||||||
}
|
}
|
||||||
extra_options_remove_branch_list->update_canvas_items();
|
extra_options_remove_branch_list->update_canvas_items();
|
||||||
|
|
||||||
extra_options_remove_remote_list->clear();
|
extra_options_remove_remote_list->clear();
|
||||||
for (int i = 0; i < remote_select->get_item_count(); i++) {
|
for (int i = 0; i < remote_select->get_item_count(); i++) {
|
||||||
extra_options_remove_remote_list->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("ArrowUp")), remote_select->get_item_text(remote_select->get_item_id(i)));
|
extra_options_remove_remote_list->add_icon_item(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("ArrowUp"), EditorStringName(EditorIcons)), remote_select->get_item_text(remote_select->get_item_id(i)));
|
||||||
}
|
}
|
||||||
extra_options_remove_remote_list->update_canvas_items();
|
extra_options_remove_remote_list->update_canvas_items();
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1161,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||||
refresh_button = memnew(Button);
|
refresh_button = memnew(Button);
|
||||||
refresh_button->set_tooltip_text(TTR("Detect new changes"));
|
refresh_button->set_tooltip_text(TTR("Detect new changes"));
|
||||||
refresh_button->set_flat(true);
|
refresh_button->set_flat(true);
|
||||||
refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Reload")));
|
refresh_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||||
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
|
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
|
||||||
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_commit_list));
|
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_commit_list));
|
||||||
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_branch_list));
|
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_branch_list));
|
||||||
|
@ -1181,14 +1181,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||||
|
|
||||||
discard_all_button = memnew(Button);
|
discard_all_button = memnew(Button);
|
||||||
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
|
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
|
||||||
discard_all_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Close")));
|
discard_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)));
|
||||||
discard_all_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
|
discard_all_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
|
||||||
discard_all_button->set_flat(true);
|
discard_all_button->set_flat(true);
|
||||||
unstage_title->add_child(discard_all_button);
|
unstage_title->add_child(discard_all_button);
|
||||||
|
|
||||||
stage_all_button = memnew(Button);
|
stage_all_button = memnew(Button);
|
||||||
stage_all_button->set_flat(true);
|
stage_all_button->set_flat(true);
|
||||||
stage_all_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MoveDown")));
|
stage_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||||
stage_all_button->set_tooltip_text(TTR("Stage all changes"));
|
stage_all_button->set_tooltip_text(TTR("Stage all changes"));
|
||||||
unstage_title->add_child(stage_all_button);
|
unstage_title->add_child(stage_all_button);
|
||||||
|
|
||||||
|
@ -1218,7 +1218,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||||
|
|
||||||
unstage_all_button = memnew(Button);
|
unstage_all_button = memnew(Button);
|
||||||
unstage_all_button->set_flat(true);
|
unstage_all_button->set_flat(true);
|
||||||
unstage_all_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MoveUp")));
|
unstage_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||||
unstage_all_button->set_tooltip_text(TTR("Unstage all changes"));
|
unstage_all_button->set_tooltip_text(TTR("Unstage all changes"));
|
||||||
stage_title->add_child(unstage_all_button);
|
stage_title->add_child(unstage_all_button);
|
||||||
|
|
||||||
|
@ -1413,26 +1413,26 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||||
fetch_button = memnew(Button);
|
fetch_button = memnew(Button);
|
||||||
fetch_button->set_flat(true);
|
fetch_button->set_flat(true);
|
||||||
fetch_button->set_tooltip_text(TTR("Fetch"));
|
fetch_button->set_tooltip_text(TTR("Fetch"));
|
||||||
fetch_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Reload")));
|
fetch_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||||
fetch_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_fetch));
|
fetch_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_fetch));
|
||||||
menu_bar->add_child(fetch_button);
|
menu_bar->add_child(fetch_button);
|
||||||
|
|
||||||
pull_button = memnew(Button);
|
pull_button = memnew(Button);
|
||||||
pull_button->set_flat(true);
|
pull_button->set_flat(true);
|
||||||
pull_button->set_tooltip_text(TTR("Pull"));
|
pull_button->set_tooltip_text(TTR("Pull"));
|
||||||
pull_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MoveDown")));
|
pull_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||||
pull_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_pull));
|
pull_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_pull));
|
||||||
menu_bar->add_child(pull_button);
|
menu_bar->add_child(pull_button);
|
||||||
|
|
||||||
push_button = memnew(Button);
|
push_button = memnew(Button);
|
||||||
push_button->set_flat(true);
|
push_button->set_flat(true);
|
||||||
push_button->set_tooltip_text(TTR("Push"));
|
push_button->set_tooltip_text(TTR("Push"));
|
||||||
push_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("MoveUp")));
|
push_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||||
push_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_push));
|
push_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_push));
|
||||||
menu_bar->add_child(push_button);
|
menu_bar->add_child(push_button);
|
||||||
|
|
||||||
extra_options = memnew(MenuButton);
|
extra_options = memnew(MenuButton);
|
||||||
extra_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("GuiTabMenuHl")));
|
extra_options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
|
||||||
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
|
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
|
||||||
extra_options->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
|
extra_options->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
|
||||||
menu_bar->add_child(extra_options);
|
menu_bar->add_child(extra_options);
|
||||||
|
@ -1463,19 +1463,19 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||||
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = TTR("Typechange");
|
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = TTR("Typechange");
|
||||||
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = TTR("Unmerged");
|
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = TTR("Unmerged");
|
||||||
|
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_NEW] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("success_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_NEW] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("success_color"), EditorStringName(Editor));
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor));
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_RENAMED] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_RENAMED] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor));
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_DELETED] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_DELETED] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor));
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("font_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("font_color"), EditorStringName(Editor));
|
||||||
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
|
change_type_to_color[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor));
|
||||||
|
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_NEW] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusSuccess"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_NEW] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusSuccess"), EditorStringName(EditorIcons));
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusWarning"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusWarning"), EditorStringName(EditorIcons));
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_RENAMED] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusWarning"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_RENAMED] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusWarning"), EditorStringName(EditorIcons));
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusWarning"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_TYPECHANGE] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusWarning"), EditorStringName(EditorIcons));
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_DELETED] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusError"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_DELETED] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusError"), EditorStringName(EditorIcons));
|
||||||
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("StatusWarning"));
|
change_type_to_icon[EditorVCSInterface::CHANGE_TYPE_UNMERGED] = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("StatusWarning"), EditorStringName(EditorIcons));
|
||||||
|
|
||||||
version_control_dock = memnew(VBoxContainer);
|
version_control_dock = memnew(VBoxContainer);
|
||||||
version_control_dock->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
version_control_dock->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
|
|
|
@ -419,8 +419,8 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
||||||
// Visual shader specific theme for MSDF font.
|
// Visual shader specific theme for MSDF font.
|
||||||
Ref<Theme> vstheme;
|
Ref<Theme> vstheme;
|
||||||
vstheme.instantiate();
|
vstheme.instantiate();
|
||||||
Ref<Font> label_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_msdf", EditorStringName(EditorIcons));
|
Ref<Font> label_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_msdf", EditorStringName(EditorFonts));
|
||||||
Ref<Font> label_bold_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_bold_msdf", EditorStringName(EditorIcons));
|
Ref<Font> label_bold_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_bold_msdf", EditorStringName(EditorFonts));
|
||||||
vstheme->set_font("font", "Label", label_font);
|
vstheme->set_font("font", "Label", label_font);
|
||||||
vstheme->set_font("font", "GraphNodeTitleLabel", label_bold_font);
|
vstheme->set_font("font", "GraphNodeTitleLabel", label_bold_font);
|
||||||
vstheme->set_font("font", "LineEdit", label_font);
|
vstheme->set_font("font", "LineEdit", label_font);
|
||||||
|
@ -796,7 +796,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
||||||
name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, false), CONNECT_DEFERRED);
|
name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, false), CONNECT_DEFERRED);
|
||||||
|
|
||||||
Button *remove_btn = memnew(Button);
|
Button *remove_btn = memnew(Button);
|
||||||
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Remove")));
|
remove_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
|
||||||
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
|
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
|
||||||
remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_input_port).bind(p_id, i), CONNECT_DEFERRED);
|
remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_input_port).bind(p_id, i), CONNECT_DEFERRED);
|
||||||
hb->add_child(remove_btn);
|
hb->add_child(remove_btn);
|
||||||
|
@ -823,7 +823,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
||||||
if (valid_right) {
|
if (valid_right) {
|
||||||
if (is_group) {
|
if (is_group) {
|
||||||
Button *remove_btn = memnew(Button);
|
Button *remove_btn = memnew(Button);
|
||||||
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Remove")));
|
remove_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
|
||||||
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
|
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
|
||||||
remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_output_port).bind(p_id, i), CONNECT_DEFERRED);
|
remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_output_port).bind(p_id, i), CONNECT_DEFERRED);
|
||||||
hb->add_child(remove_btn);
|
hb->add_child(remove_btn);
|
||||||
|
@ -4709,28 +4709,28 @@ void VisualShaderEditor::_update_varying_tree() {
|
||||||
|
|
||||||
switch (varying->type) {
|
switch (varying->type) {
|
||||||
case VisualShader::VARYING_TYPE_FLOAT:
|
case VisualShader::VARYING_TYPE_FLOAT:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("float")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("float"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_INT:
|
case VisualShader::VARYING_TYPE_INT:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("int")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("int"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_UINT:
|
case VisualShader::VARYING_TYPE_UINT:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("uint")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("uint"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_VECTOR_2D:
|
case VisualShader::VARYING_TYPE_VECTOR_2D:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector2")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector2"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_VECTOR_3D:
|
case VisualShader::VARYING_TYPE_VECTOR_3D:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector3")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector3"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_VECTOR_4D:
|
case VisualShader::VARYING_TYPE_VECTOR_4D:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector4")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector4"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_BOOLEAN:
|
case VisualShader::VARYING_TYPE_BOOLEAN:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("bool")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("bool"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
case VisualShader::VARYING_TYPE_TRANSFORM:
|
case VisualShader::VARYING_TYPE_TRANSFORM:
|
||||||
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Transform3D")));
|
item->set_icon(0, EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Transform3D"), EditorStringName(EditorIcons)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -6195,15 +6195,15 @@ public:
|
||||||
editor = p_editor;
|
editor = p_editor;
|
||||||
input = p_input;
|
input = p_input;
|
||||||
Ref<Texture2D> type_icon[] = {
|
Ref<Texture2D> type_icon[] = {
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("float")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("float"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("int")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("int"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("uint")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("uint"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector2")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector2"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector3")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector3"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector4")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector4"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("bool")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("bool"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Transform3D")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Transform3D"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("ImageTexture")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("ImageTexture"), EditorStringName(EditorIcons)),
|
||||||
};
|
};
|
||||||
|
|
||||||
add_item("[None]");
|
add_item("[None]");
|
||||||
|
@ -6245,14 +6245,14 @@ public:
|
||||||
varying = p_varying;
|
varying = p_varying;
|
||||||
|
|
||||||
Ref<Texture2D> type_icon[] = {
|
Ref<Texture2D> type_icon[] = {
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("float")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("float"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("int")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("int"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("uint")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("uint"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector2")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector2"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector3")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector3"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector4")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector4"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("bool")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("bool"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Transform3D")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Transform3D"), EditorStringName(EditorIcons)),
|
||||||
};
|
};
|
||||||
|
|
||||||
bool is_getter = Ref<VisualShaderNodeVaryingGetter>(p_varying.ptr()).is_valid();
|
bool is_getter = Ref<VisualShaderNodeVaryingGetter>(p_varying.ptr()).is_valid();
|
||||||
|
@ -6325,16 +6325,16 @@ public:
|
||||||
parameter_ref = p_parameter_ref;
|
parameter_ref = p_parameter_ref;
|
||||||
|
|
||||||
Ref<Texture2D> type_icon[] = {
|
Ref<Texture2D> type_icon[] = {
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("float")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("float"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("int")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("int"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("uint")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("uint"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("bool")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("bool"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector2")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector2"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector3")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector3"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Vector4")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Vector4"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Transform3D")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Transform3D"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Color")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Color"), EditorStringName(EditorIcons)),
|
||||||
EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("ImageTexture")),
|
EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("ImageTexture"), EditorStringName(EditorIcons)),
|
||||||
};
|
};
|
||||||
|
|
||||||
add_item("[None]");
|
add_item("[None]");
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "editor/editor_interface.h"
|
#include "editor/editor_interface.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
|
#include "editor/editor_string_names.h"
|
||||||
#include "editor/gui/editor_file_dialog.h"
|
#include "editor/gui/editor_file_dialog.h"
|
||||||
|
|
||||||
void VoxelGIEditorPlugin::_bake() {
|
void VoxelGIEditorPlugin::_bake() {
|
||||||
|
@ -185,7 +186,9 @@ VoxelGIEditorPlugin::VoxelGIEditorPlugin() {
|
||||||
bake_hb->hide();
|
bake_hb->hide();
|
||||||
bake = memnew(Button);
|
bake = memnew(Button);
|
||||||
bake->set_flat(true);
|
bake->set_flat(true);
|
||||||
bake->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon(SNAME("Bake")));
|
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
|
||||||
|
// when the editor theme updates.
|
||||||
|
bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||||
bake->set_text(TTR("Bake VoxelGI"));
|
bake->set_text(TTR("Bake VoxelGI"));
|
||||||
bake->connect("pressed", callable_mp(this, &VoxelGIEditorPlugin::_bake));
|
bake->connect("pressed", callable_mp(this, &VoxelGIEditorPlugin::_bake));
|
||||||
bake_hb->add_child(bake);
|
bake_hb->add_child(bake);
|
||||||
|
|
|
@ -397,11 +397,11 @@ void RenameDialog::_update_preview(String new_text) {
|
||||||
|
|
||||||
if (new_name == preview_node->get_name()) {
|
if (new_name == preview_node->get_name()) {
|
||||||
// New name is identical to the old one. Don't color it as much to avoid distracting the user.
|
// New name is identical to the old one. Don't color it as much to avoid distracting the user.
|
||||||
const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), EditorStringName(Editor));
|
const Color accent_color = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("accent_color"), EditorStringName(Editor));
|
||||||
const Color text_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("default_color"), SNAME("RichTextLabel"));
|
const Color text_color = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("default_color"), SNAME("RichTextLabel"));
|
||||||
lbl_preview->add_theme_color_override("font_color", accent_color.lerp(text_color, 0.5));
|
lbl_preview->add_theme_color_override("font_color", accent_color.lerp(text_color, 0.5));
|
||||||
} else {
|
} else {
|
||||||
lbl_preview->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("success_color"), EditorStringName(Editor)));
|
lbl_preview->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("success_color"), EditorStringName(Editor)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *
|
||||||
|
|
||||||
self->has_errors = true;
|
self->has_errors = true;
|
||||||
self->lbl_preview_title->set_text(TTR("Regular Expression Error:"));
|
self->lbl_preview_title->set_text(TTR("Regular Expression Error:"));
|
||||||
self->lbl_preview->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
self->lbl_preview->add_theme_color_override("font_color", EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||||
self->lbl_preview->set_text(vformat(TTR("At character %s"), err_str));
|
self->lbl_preview->set_text(vformat(TTR("At character %s"), err_str));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -385,7 +385,7 @@ void ScreenSelect::_notification(int p_what) {
|
||||||
connect("gui_input", callable_mp(this, &ScreenSelect::_handle_mouse_shortcut));
|
connect("gui_input", callable_mp(this, &ScreenSelect::_handle_mouse_shortcut));
|
||||||
} break;
|
} break;
|
||||||
case NOTIFICATION_THEME_CHANGED: {
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("MakeFloating"));
|
set_icon(get_editor_theme_icon("MakeFloating"));
|
||||||
popup_background->add_theme_style_override("panel", get_theme_stylebox("PanelForeground", EditorStringName(EditorStyles)));
|
popup_background->add_theme_style_override("panel", get_theme_stylebox("PanelForeground", EditorStringName(EditorStyles)));
|
||||||
|
|
||||||
const real_t popup_height = real_t(get_theme_font_size("font_size")) * 2.0;
|
const real_t popup_height = real_t(get_theme_font_size("font_size")) * 2.0;
|
||||||
|
|
|
@ -499,7 +499,7 @@ namespace GodotTools
|
||||||
_toolBarBuildButton = new Button
|
_toolBarBuildButton = new Button
|
||||||
{
|
{
|
||||||
Flat = true,
|
Flat = true,
|
||||||
Icon = editorBaseControl.GetThemeIcon("BuildCSharp", "EditorIcons"),
|
Icon = EditorInterface.Singleton.GetEditorTheme().GetIcon("BuildCSharp", "EditorIcons"),
|
||||||
FocusMode = Control.FocusModeEnum.None,
|
FocusMode = Control.FocusModeEnum.None,
|
||||||
Shortcut = EditorDefShortcut("mono/build_solution", "Build Project".TTR(), (Key)KeyModifierMask.MaskAlt | Key.B),
|
Shortcut = EditorDefShortcut("mono/build_solution", "Build Project".TTR(), (Key)KeyModifierMask.MaskAlt | Key.B),
|
||||||
ShortcutInTooltip = true,
|
ShortcutInTooltip = true,
|
||||||
|
|
|
@ -359,7 +359,7 @@ void ReplicationEditor::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE:
|
case NOTIFICATION_ENTER_TREE:
|
||||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||||
add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
add_theme_style_override("panel", EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||||
add_pick_button->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
|
add_pick_button->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
|
||||||
pin->set_icon(get_theme_icon(SNAME("Pin"), EditorStringName(EditorIcons)));
|
pin->set_icon(get_theme_icon(SNAME("Pin"), EditorStringName(EditorIcons)));
|
||||||
} break;
|
} break;
|
||||||
|
|
Loading…
Reference in a new issue