summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--editor/filesystem_dock.cpp9
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
-rw-r--r--editor/script_create_dialog.cpp13
-rw-r--r--editor/script_create_dialog.h1
5 files changed, 17 insertions, 12 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 15fb6a9521..2cacc767c8 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1012,6 +1012,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("grid_major", "GraphEdit", Color(0.0, 0.0, 0.0, 0.15));
theme->set_color("grid_minor", "GraphEdit", Color(0.0, 0.0, 0.0, 0.07));
}
+ theme->set_color("selection_fill", "GraphEdit", theme->get_color("box_selection_fill_color", "Editor"));
+ theme->set_color("selection_stroke", "GraphEdit", theme->get_color("box_selection_stroke_color", "Editor"));
theme->set_color("activity", "GraphEdit", accent_color);
theme->set_icon("minus", "GraphEdit", theme->get_icon("ZoomLess", "EditorIcons"));
theme->set_icon("more", "GraphEdit", theme->get_icon("ZoomMore", "EditorIcons"));
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 1fecdfe555..fb5c2b25c9 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -90,6 +90,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
// Create all items for the files in the subdirectory.
if (display_mode == DISPLAY_MODE_TREE_ONLY) {
+ String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
for (int i = 0; i < p_dir->get_file_count(); i++) {
String file_type = p_dir->get_file_type(i);
@@ -119,7 +120,6 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
file_item->select(0);
file_item->set_as_cursor(0);
}
- String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
if (main_scene == file_metadata) {
file_item->set_custom_color(0, get_color("accent_color", "Editor"));
}
@@ -750,6 +750,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
}
// Fills the ItemList control node from the FileInfos.
+ String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
String oi = "Object";
for (List<FileInfo>::Element *E = filelist.front(); E; E = E->next()) {
FileInfo *finfo = &(E->get());
@@ -786,6 +787,10 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
files->set_item_metadata(item_index, fpath);
}
+ if (fpath == main_scene) {
+ files->set_item_custom_fg_color(item_index, get_color("accent_color", "Editor"));
+ }
+
// Generate the preview.
if (!finfo->import_broken) {
Array udata;
@@ -1756,7 +1761,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
fpath = fpath.get_base_dir();
}
make_script_dialog->config("Node", fpath.plus_file("new_script.gd"), false);
- make_script_dialog->popup_centered(Size2(300, 300) * EDSCALE);
+ make_script_dialog->popup_centered();
} break;
case FILE_COPY_PATH: {
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 335466b0c5..d0bd57d658 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1004,8 +1004,8 @@ void ScriptEditor::_menu_option(int p_option) {
ScriptEditorBase *current = _get_current_editor();
switch (p_option) {
case FILE_NEW: {
- script_create_dialog->config("Node", "new_script");
- script_create_dialog->popup_centered(Size2(300, 300) * EDSCALE);
+ script_create_dialog->config("Node", "new_script", false);
+ script_create_dialog->popup_centered();
} break;
case FILE_NEW_TEXTFILE: {
file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index e1f9ed497c..25bc13033c 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -678,6 +678,11 @@ void ScriptCreateDialog::_update_dialog() {
}
}
+ if (!_can_be_built_in()) {
+ internal->set_pressed(false);
+ }
+ internal->set_disabled(!_can_be_built_in());
+
/* Is Script created or loaded from existing file */
if (is_built_in) {
@@ -685,8 +690,6 @@ void ScriptCreateDialog::_update_dialog() {
parent_name->set_editable(true);
parent_search_button->set_disabled(false);
parent_browse_button->set_disabled(!can_inherit_from_file);
- internal->set_visible(_can_be_built_in());
- internal_label->set_visible(_can_be_built_in());
_msg_path_valid(true, TTR("Built-in script (into scene file)."));
} else if (is_new_script_created) {
// New Script Created
@@ -694,8 +697,6 @@ void ScriptCreateDialog::_update_dialog() {
parent_name->set_editable(true);
parent_search_button->set_disabled(false);
parent_browse_button->set_disabled(!can_inherit_from_file);
- internal->set_visible(_can_be_built_in());
- internal_label->set_visible(_can_be_built_in());
if (is_path_valid) {
_msg_path_valid(true, TTR("Will create a new script file."));
}
@@ -705,7 +706,6 @@ void ScriptCreateDialog::_update_dialog() {
parent_name->set_editable(false);
parent_search_button->set_disabled(true);
parent_browse_button->set_disabled(true);
- internal->set_disabled(!_can_be_built_in());
if (is_path_valid) {
_msg_path_valid(true, TTR("Will load an existing script file."));
}
@@ -834,8 +834,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
internal = memnew(CheckBox);
internal->set_text(TTR("On"));
internal->connect("pressed", this, "_built_in_pressed");
- internal_label = memnew(Label(TTR("Built-in Script:")));
- gc->add_child(internal_label);
+ gc->add_child(memnew(Label(TTR("Built-in Script:"))));
gc->add_child(internal);
/* Path */
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index 4d13bc9291..91d6315a78 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -58,7 +58,6 @@ class ScriptCreateDialog : public ConfirmationDialog {
Button *path_button;
EditorFileDialog *file_browse;
CheckBox *internal;
- Label *internal_label;
VBoxContainer *path_vb;
AcceptDialog *alert;
CreateDialog *select_class;