mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Merge pull request #106923 from timothyqiu/category-created-equal
Improve `EditorInspectorCategory`
This commit is contained in:
commit
d724ff20d8
3 changed files with 117 additions and 87 deletions
|
|
@ -48,7 +48,6 @@
|
||||||
#include "editor/multi_node_edit.h"
|
#include "editor/multi_node_edit.h"
|
||||||
#include "editor/plugins/script_editor_plugin.h"
|
#include "editor/plugins/script_editor_plugin.h"
|
||||||
#include "editor/themes/editor_scale.h"
|
#include "editor/themes/editor_scale.h"
|
||||||
#include "editor/themes/editor_theme_manager.h"
|
|
||||||
#include "scene/gui/margin_container.h"
|
#include "scene/gui/margin_container.h"
|
||||||
#include "scene/gui/separator.h"
|
#include "scene/gui/separator.h"
|
||||||
#include "scene/gui/spin_box.h"
|
#include "scene/gui/spin_box.h"
|
||||||
|
|
@ -1554,6 +1553,17 @@ void EditorInspectorPlugin::_bind_methods() {
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static Ref<Script> _get_category_script(const PropertyInfo &p_info) {
|
||||||
|
if (!p_info.hint_string.is_empty() && !EditorNode::get_editor_data().is_type_recognized(p_info.name) && ResourceLoader::exists(p_info.hint_string, "Script")) {
|
||||||
|
return ResourceLoader::load(p_info.hint_string, "Script");
|
||||||
|
}
|
||||||
|
return Ref<Script>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorInspectorCategory::_bind_methods() {
|
||||||
|
ADD_SIGNAL(MethodInfo("unfavorite_all"));
|
||||||
|
}
|
||||||
|
|
||||||
void EditorInspectorCategory::_notification(int p_what) {
|
void EditorInspectorCategory::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
||||||
|
|
@ -1570,14 +1580,17 @@ void EditorInspectorCategory::_notification(int p_what) {
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_THEME_CHANGED: {
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
if (menu) {
|
menu_icon_dirty = true;
|
||||||
if (is_favorite) {
|
_update_icon();
|
||||||
menu->set_item_icon(menu->get_item_index(EditorInspector::MENU_UNFAVORITE_ALL), get_editor_theme_icon(SNAME("Unfavorite")));
|
|
||||||
} else {
|
|
||||||
menu->set_item_icon(menu->get_item_index(MENU_OPEN_DOCS), get_editor_theme_icon(SNAME("Help")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||||
|
if (is_favorite) {
|
||||||
|
label = TTR("Favorites");
|
||||||
|
}
|
||||||
|
queue_accessibility_update();
|
||||||
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_DRAW: {
|
case NOTIFICATION_DRAW: {
|
||||||
Ref<StyleBox> sb = get_theme_stylebox(SNAME("bg"));
|
Ref<StyleBox> sb = get_theme_stylebox(SNAME("bg"));
|
||||||
|
|
||||||
|
|
@ -1623,19 +1636,7 @@ void EditorInspectorCategory::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorInspectorCategory::_accessibility_action_menu(const Variant &p_data) {
|
void EditorInspectorCategory::_accessibility_action_menu(const Variant &p_data) {
|
||||||
if (!is_favorite) {
|
_popup_context_menu(get_screen_position());
|
||||||
if (!menu) {
|
|
||||||
menu = memnew(PopupMenu);
|
|
||||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Help")), TTR("Open Documentation"), MENU_OPEN_DOCS);
|
|
||||||
add_child(menu);
|
|
||||||
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
|
|
||||||
}
|
|
||||||
menu->set_item_disabled(menu->get_item_index(MENU_OPEN_DOCS), !EditorHelp::get_doc_data()->class_list.has(doc_class_name));
|
|
||||||
}
|
|
||||||
|
|
||||||
menu->set_position(get_screen_position());
|
|
||||||
menu->reset_size();
|
|
||||||
menu->popup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) const {
|
Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) const {
|
||||||
|
|
@ -1647,13 +1648,29 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons
|
||||||
return EditorHelpBitTooltip::show_tooltip(const_cast<EditorInspectorCategory *>(this), p_text);
|
return EditorHelpBitTooltip::show_tooltip(const_cast<EditorInspectorCategory *>(this), p_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorInspectorCategory::set_as_favorite(EditorInspector *p_for_inspector) {
|
void EditorInspectorCategory::set_as_favorite() {
|
||||||
is_favorite = true;
|
is_favorite = true;
|
||||||
|
_update_icon();
|
||||||
|
}
|
||||||
|
|
||||||
menu = memnew(PopupMenu);
|
void EditorInspectorCategory::set_property_info(const PropertyInfo &p_info) {
|
||||||
menu->add_item(TTR("Unfavorite All"), EditorInspector::MENU_UNFAVORITE_ALL);
|
info = p_info;
|
||||||
add_child(menu);
|
|
||||||
menu->connect(SceneStringName(id_pressed), callable_mp(p_for_inspector, &EditorInspector::_handle_menu_option));
|
Ref<Script> scr = _get_category_script(info);
|
||||||
|
if (scr.is_valid()) {
|
||||||
|
StringName script_name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
|
||||||
|
if (script_name != StringName()) {
|
||||||
|
label = script_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (label.is_empty()) {
|
||||||
|
label = info.name;
|
||||||
|
}
|
||||||
|
_update_icon();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorInspectorCategory::set_doc_class_name(const String &p_name) {
|
||||||
|
doc_class_name = p_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2 EditorInspectorCategory::get_minimum_size() const {
|
Size2 EditorInspectorCategory::get_minimum_size() const {
|
||||||
|
|
@ -1676,36 +1693,77 @@ Size2 EditorInspectorCategory::get_minimum_size() const {
|
||||||
|
|
||||||
void EditorInspectorCategory::_handle_menu_option(int p_option) {
|
void EditorInspectorCategory::_handle_menu_option(int p_option) {
|
||||||
switch (p_option) {
|
switch (p_option) {
|
||||||
case MENU_OPEN_DOCS:
|
case MENU_OPEN_DOCS: {
|
||||||
ScriptEditor::get_singleton()->goto_help("class:" + doc_class_name);
|
ScriptEditor::get_singleton()->goto_help("class:" + doc_class_name);
|
||||||
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_SCRIPT);
|
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_SCRIPT);
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
|
case MENU_UNFAVORITE_ALL: {
|
||||||
|
emit_signal(SNAME("unfavorite_all"));
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorInspectorCategory::gui_input(const Ref<InputEvent> &p_event) {
|
void EditorInspectorCategory::_popup_context_menu(const Point2i &p_position) {
|
||||||
if (!is_favorite && doc_class_name.is_empty()) {
|
if (!is_favorite && doc_class_name.is_empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Ref<InputEventMouseButton> &mb_event = p_event;
|
if (menu == nullptr) {
|
||||||
if (mb_event.is_null() || !mb_event->is_pressed() || mb_event->get_button_index() != MouseButton::RIGHT) {
|
menu = memnew(PopupMenu);
|
||||||
|
|
||||||
|
if (is_favorite) {
|
||||||
|
menu->add_item(TTRC("Unfavorite All"), MENU_UNFAVORITE_ALL);
|
||||||
|
} else {
|
||||||
|
menu->add_item(TTRC("Open Documentation"), MENU_OPEN_DOCS);
|
||||||
|
menu->set_item_disabled(-1, !EditorHelp::get_doc_data()->class_list.has(doc_class_name));
|
||||||
|
}
|
||||||
|
|
||||||
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
|
||||||
|
add_child(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menu_icon_dirty) {
|
||||||
|
if (is_favorite) {
|
||||||
|
menu->set_item_icon(menu->get_item_index(MENU_UNFAVORITE_ALL), get_editor_theme_icon(SNAME("Unfavorite")));
|
||||||
|
} else {
|
||||||
|
menu->set_item_icon(menu->get_item_index(MENU_OPEN_DOCS), get_editor_theme_icon(SNAME("Help")));
|
||||||
|
}
|
||||||
|
menu_icon_dirty = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
menu->set_position(p_position);
|
||||||
|
menu->reset_size();
|
||||||
|
menu->popup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorInspectorCategory::_update_icon() {
|
||||||
|
if (is_favorite) {
|
||||||
|
icon = get_editor_theme_icon(SNAME("Favorites"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_favorite) {
|
icon = Ref<Texture2D>();
|
||||||
if (!menu) {
|
|
||||||
menu = memnew(PopupMenu);
|
Ref<Script> scr = _get_category_script(info);
|
||||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Help")), TTR("Open Documentation"), MENU_OPEN_DOCS);
|
if (scr.is_valid()) {
|
||||||
add_child(menu);
|
StringName script_name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
|
||||||
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
|
if (script_name == StringName()) {
|
||||||
|
icon = EditorNode::get_singleton()->get_object_icon(scr.ptr(), "Object");
|
||||||
|
} else {
|
||||||
|
icon = EditorNode::get_singleton()->get_class_icon(script_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (icon.is_null() && !info.name.is_empty()) {
|
||||||
|
icon = EditorNode::get_singleton()->get_class_icon(info.name);
|
||||||
}
|
}
|
||||||
menu->set_item_disabled(menu->get_item_index(MENU_OPEN_DOCS), !EditorHelp::get_doc_data()->class_list.has(doc_class_name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->set_position(get_screen_position() + mb_event->get_position());
|
void EditorInspectorCategory::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
menu->reset_size();
|
const Ref<InputEventMouseButton> &mb = p_event;
|
||||||
menu->popup();
|
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
|
||||||
|
_popup_context_menu(get_screen_position() + mb->get_position());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorInspectorCategory::EditorInspectorCategory() {
|
EditorInspectorCategory::EditorInspectorCategory() {
|
||||||
|
|
@ -3614,17 +3672,13 @@ void EditorInspector::update_tree() {
|
||||||
continue; // Empty, ignore it.
|
continue; // Empty, ignore it.
|
||||||
}
|
}
|
||||||
|
|
||||||
String category_label;
|
|
||||||
String category_tooltip;
|
String category_tooltip;
|
||||||
Ref<Texture> category_icon;
|
|
||||||
|
|
||||||
// Do not add an icon, do not change the current class (`doc_name`) for custom categories.
|
// Do not add an icon, do not change the current class (`doc_name`) for custom categories.
|
||||||
if (is_custom_category) {
|
if (is_custom_category) {
|
||||||
category_label = p.name;
|
|
||||||
category_tooltip = p.name;
|
category_tooltip = p.name;
|
||||||
} else {
|
} else {
|
||||||
doc_name = p.name;
|
doc_name = p.name;
|
||||||
category_label = p.name;
|
|
||||||
|
|
||||||
// Use category's owner script to update some of its information.
|
// Use category's owner script to update some of its information.
|
||||||
if (!EditorNode::get_editor_data().is_type_recognized(p.name) && ResourceLoader::exists(p.hint_string, "Script")) {
|
if (!EditorNode::get_editor_data().is_type_recognized(p.name) && ResourceLoader::exists(p.hint_string, "Script")) {
|
||||||
|
|
@ -3632,14 +3686,6 @@ void EditorInspector::update_tree() {
|
||||||
if (scr.is_valid()) {
|
if (scr.is_valid()) {
|
||||||
doc_name = scr->get_doc_class_name();
|
doc_name = scr->get_doc_class_name();
|
||||||
|
|
||||||
StringName script_name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
|
|
||||||
if (script_name != StringName()) {
|
|
||||||
category_label = script_name;
|
|
||||||
category_icon = EditorNode::get_singleton()->get_class_icon(script_name);
|
|
||||||
} else {
|
|
||||||
category_icon = EditorNode::get_singleton()->get_object_icon(scr.ptr(), "Object");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Property favorites aren't compatible with built-in scripts.
|
// Property favorites aren't compatible with built-in scripts.
|
||||||
if (scr->is_built_in()) {
|
if (scr->is_built_in()) {
|
||||||
disable_favorite = true;
|
disable_favorite = true;
|
||||||
|
|
@ -3647,10 +3693,6 @@ void EditorInspector::update_tree() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category_icon.is_null() && !p.name.is_empty()) {
|
|
||||||
category_icon = EditorNode::get_singleton()->get_class_icon(p.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (use_doc_hints) {
|
if (use_doc_hints) {
|
||||||
// `|` separators used in `EditorHelpBit`.
|
// `|` separators used in `EditorHelpBit`.
|
||||||
category_tooltip = "class|" + doc_name + "|";
|
category_tooltip = "class|" + doc_name + "|";
|
||||||
|
|
@ -3668,15 +3710,14 @@ void EditorInspector::update_tree() {
|
||||||
|
|
||||||
// Create an EditorInspectorCategory and add it to the inspector.
|
// Create an EditorInspectorCategory and add it to the inspector.
|
||||||
EditorInspectorCategory *category = memnew(EditorInspectorCategory);
|
EditorInspectorCategory *category = memnew(EditorInspectorCategory);
|
||||||
|
category->set_property_info(p);
|
||||||
main_vbox->add_child(category);
|
main_vbox->add_child(category);
|
||||||
category_vbox = nullptr; // Reset.
|
category_vbox = nullptr; // Reset.
|
||||||
|
|
||||||
// Set the category info.
|
// Set the category info.
|
||||||
category->label = category_label;
|
|
||||||
category->set_tooltip_text(category_tooltip);
|
category->set_tooltip_text(category_tooltip);
|
||||||
category->icon = category_icon;
|
|
||||||
if (!is_custom_category) {
|
if (!is_custom_category) {
|
||||||
category->doc_class_name = doc_name;
|
category->set_doc_class_name(doc_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add editors at the start of a category.
|
// Add editors at the start of a category.
|
||||||
|
|
@ -5239,8 +5280,6 @@ void EditorInspector::_notification(int p_what) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
favorites_category->icon = get_editor_theme_icon(SNAME("Favorites"));
|
|
||||||
|
|
||||||
int separation = get_theme_constant(SNAME("v_separation"), SNAME("EditorInspector"));
|
int separation = get_theme_constant(SNAME("v_separation"), SNAME("EditorInspector"));
|
||||||
base_vbox->add_theme_constant_override("separation", separation);
|
base_vbox->add_theme_constant_override("separation", separation);
|
||||||
begin_vbox->add_theme_constant_override("separation", separation);
|
begin_vbox->add_theme_constant_override("separation", separation);
|
||||||
|
|
@ -5425,14 +5464,6 @@ void EditorInspector::_add_meta_confirm() {
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorInspector::_handle_menu_option(int p_option) {
|
|
||||||
switch (p_option) {
|
|
||||||
case MENU_UNFAVORITE_ALL:
|
|
||||||
_clear_current_favorites();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditorInspector::_bind_methods() {
|
void EditorInspector::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("edit", "object"), &EditorInspector::edit);
|
ClassDB::bind_method(D_METHOD("edit", "object"), &EditorInspector::edit);
|
||||||
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
|
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
|
||||||
|
|
@ -5467,10 +5498,10 @@ EditorInspector::EditorInspector() {
|
||||||
base_vbox->add_child(favorites_section);
|
base_vbox->add_child(favorites_section);
|
||||||
favorites_section->hide();
|
favorites_section->hide();
|
||||||
|
|
||||||
favorites_category = memnew(EditorInspectorCategory);
|
EditorInspectorCategory *favorites_category = memnew(EditorInspectorCategory);
|
||||||
favorites_category->set_as_favorite(this);
|
favorites_category->set_as_favorite();
|
||||||
|
favorites_category->connect("unfavorite_all", callable_mp(this, &EditorInspector::_clear_current_favorites));
|
||||||
favorites_section->add_child(favorites_category);
|
favorites_section->add_child(favorites_category);
|
||||||
favorites_category->label = TTR("Favorites");
|
|
||||||
|
|
||||||
favorites_vbox = memnew(VBoxContainer);
|
favorites_vbox = memnew(VBoxContainer);
|
||||||
favorites_section->add_child(favorites_vbox);
|
favorites_section->add_child(favorites_vbox);
|
||||||
|
|
|
||||||
|
|
@ -303,29 +303,36 @@ public:
|
||||||
class EditorInspectorCategory : public Control {
|
class EditorInspectorCategory : public Control {
|
||||||
GDCLASS(EditorInspectorCategory, Control);
|
GDCLASS(EditorInspectorCategory, Control);
|
||||||
|
|
||||||
friend class EditorInspector;
|
|
||||||
|
|
||||||
// Right-click context menu options.
|
// Right-click context menu options.
|
||||||
enum ClassMenuOption {
|
enum ClassMenuOption {
|
||||||
MENU_OPEN_DOCS,
|
MENU_OPEN_DOCS,
|
||||||
|
MENU_UNFAVORITE_ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PropertyInfo info;
|
||||||
Ref<Texture2D> icon;
|
Ref<Texture2D> icon;
|
||||||
String label;
|
String label;
|
||||||
String doc_class_name;
|
String doc_class_name;
|
||||||
PopupMenu *menu = nullptr;
|
PopupMenu *menu = nullptr;
|
||||||
bool is_favorite = false;
|
bool is_favorite = false;
|
||||||
|
bool menu_icon_dirty = true;
|
||||||
|
|
||||||
void _handle_menu_option(int p_option);
|
void _handle_menu_option(int p_option);
|
||||||
|
void _popup_context_menu(const Point2i &p_position);
|
||||||
|
void _update_icon();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static void _bind_methods();
|
||||||
|
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
virtual void gui_input(const Ref<InputEvent> &p_event) override;
|
virtual void gui_input(const Ref<InputEvent> &p_event) override;
|
||||||
|
|
||||||
void _accessibility_action_menu(const Variant &p_data);
|
void _accessibility_action_menu(const Variant &p_data);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_as_favorite(EditorInspector *p_for_inspector);
|
void set_as_favorite();
|
||||||
|
void set_property_info(const PropertyInfo &p_info);
|
||||||
|
void set_doc_class_name(const String &p_name);
|
||||||
|
|
||||||
virtual Size2 get_minimum_size() const override;
|
virtual Size2 get_minimum_size() const override;
|
||||||
virtual Control *make_custom_tooltip(const String &p_text) const override;
|
virtual Control *make_custom_tooltip(const String &p_text) const override;
|
||||||
|
|
@ -555,7 +562,6 @@ public:
|
||||||
class EditorInspector : public ScrollContainer {
|
class EditorInspector : public ScrollContainer {
|
||||||
GDCLASS(EditorInspector, ScrollContainer);
|
GDCLASS(EditorInspector, ScrollContainer);
|
||||||
|
|
||||||
friend class EditorInspectorCategory;
|
|
||||||
friend class EditorPropertyResource;
|
friend class EditorPropertyResource;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
@ -564,15 +570,9 @@ class EditorInspector : public ScrollContainer {
|
||||||
static Ref<EditorInspectorPlugin> inspector_plugins[MAX_PLUGINS];
|
static Ref<EditorInspectorPlugin> inspector_plugins[MAX_PLUGINS];
|
||||||
static int inspector_plugin_count;
|
static int inspector_plugin_count;
|
||||||
|
|
||||||
// Right-click context menu options.
|
|
||||||
enum ClassMenuOption {
|
|
||||||
MENU_UNFAVORITE_ALL,
|
|
||||||
};
|
|
||||||
|
|
||||||
bool can_favorite = false;
|
bool can_favorite = false;
|
||||||
PackedStringArray current_favorites;
|
PackedStringArray current_favorites;
|
||||||
VBoxContainer *favorites_section = nullptr;
|
VBoxContainer *favorites_section = nullptr;
|
||||||
EditorInspectorCategory *favorites_category = nullptr;
|
|
||||||
VBoxContainer *favorites_vbox = nullptr;
|
VBoxContainer *favorites_vbox = nullptr;
|
||||||
VBoxContainer *favorites_groups_vbox = nullptr;
|
VBoxContainer *favorites_groups_vbox = nullptr;
|
||||||
HSeparator *favorites_separator = nullptr;
|
HSeparator *favorites_separator = nullptr;
|
||||||
|
|
@ -687,8 +687,6 @@ class EditorInspector : public ScrollContainer {
|
||||||
void _add_meta_confirm();
|
void _add_meta_confirm();
|
||||||
void _show_add_meta_dialog();
|
void _show_add_meta_dialog();
|
||||||
|
|
||||||
void _handle_menu_option(int p_option);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
|
||||||
|
|
@ -938,6 +938,7 @@ void EditorNode::_notification(int p_what) {
|
||||||
use_system_accent_color = EDITOR_GET("interface/theme/use_system_accent_color");
|
use_system_accent_color = EDITOR_GET("interface/theme/use_system_accent_color");
|
||||||
|
|
||||||
if (EditorThemeManager::is_generated_theme_outdated()) {
|
if (EditorThemeManager::is_generated_theme_outdated()) {
|
||||||
|
class_icon_cache.clear();
|
||||||
_update_theme();
|
_update_theme();
|
||||||
_build_icon_type_cache();
|
_build_icon_type_cache();
|
||||||
recent_scenes->reset_size();
|
recent_scenes->reset_size();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue