summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_data.cpp10
-rw-r--r--editor/plugins/theme_editor_plugin.cpp4
-rw-r--r--editor/project_manager.cpp3
3 files changed, 10 insertions, 7 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 130c330f5a..5118ccacad 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -262,7 +262,9 @@ EditorHistory::EditorHistory() {
}
EditorPlugin *EditorData::get_editor(Object *p_object) {
- for (int i = 0; i < editor_plugins.size(); i++) {
+ // We need to iterate backwards so that we can check user-created plugins first.
+ // Otherwise, it would not be possible for plugins to handle CanvasItem and Spatial nodes.
+ for (int i = editor_plugins.size() - 1; i > -1; i--) {
if (editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
return editor_plugins[i];
}
@@ -272,7 +274,7 @@ EditorPlugin *EditorData::get_editor(Object *p_object) {
}
EditorPlugin *EditorData::get_subeditor(Object *p_object) {
- for (int i = 0; i < editor_plugins.size(); i++) {
+ for (int i = editor_plugins.size() - 1; i > -1; i--) {
if (!editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
return editor_plugins[i];
}
@@ -283,7 +285,7 @@ EditorPlugin *EditorData::get_subeditor(Object *p_object) {
Vector<EditorPlugin *> EditorData::get_subeditors(Object *p_object) {
Vector<EditorPlugin *> sub_plugins;
- for (int i = 0; i < editor_plugins.size(); i++) {
+ for (int i = editor_plugins.size() - 1; i > -1; i--) {
if (!editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
sub_plugins.push_back(editor_plugins[i]);
}
@@ -292,7 +294,7 @@ Vector<EditorPlugin *> EditorData::get_subeditors(Object *p_object) {
}
EditorPlugin *EditorData::get_editor(String p_name) {
- for (int i = 0; i < editor_plugins.size(); i++) {
+ for (int i = editor_plugins.size() - 1; i > -1; i--) {
if (editor_plugins[i]->get_name() == p_name) {
return editor_plugins[i];
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 76dd6e38e0..932ded6938 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -206,8 +206,8 @@ void ThemeEditor::_save_template_cbk(String fname) {
file->store_line("; [value] examples:");
file->store_line("; ");
file->store_line("; Type.item = 6 ; numeric constant. ");
- file->store_line("; Type.item = #FF00FF ; HTML color ");
- file->store_line("; Type.item = #55FF00FF ; HTML color with alpha 55.");
+ file->store_line("; Type.item = #FF00FF ; HTML color (magenta).");
+ file->store_line("; Type.item = #FF00FF55 ; HTML color (magenta with alpha 0x55).");
file->store_line("; Type.item = icon(image.png) ; icon in a png file (relative to theme file).");
file->store_line("; Type.item = font(font.xres) ; font in a resource (relative to theme file).");
file->store_line("; Type.item = sbox(stylebox.xres) ; stylebox in a resource (relative to theme file).");
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index c7f03bd22b..a316756808 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1859,7 +1859,7 @@ void ProjectManager::_update_project_buttons() {
rename_btn->set_disabled(empty_selection || is_missing_project_selected);
run_btn->set_disabled(empty_selection || is_missing_project_selected);
- erase_missing_btn->set_visible(_project_list->is_any_project_missing());
+ erase_missing_btn->set_disabled(!_project_list->is_any_project_missing());
}
void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
@@ -2472,6 +2472,7 @@ ProjectManager::ProjectManager() {
{
// Project tab side bar
VBoxContainer *tree_vb = memnew(VBoxContainer);
+ tree_vb->set_custom_minimum_size(Size2(120, 120));
projects_hb->add_child(tree_vb);
Button *create = memnew(Button);