diff options
Diffstat (limited to 'editor/plugins')
| -rw-r--r-- | editor/plugins/particles_editor_plugin.cpp | 4 | ||||
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 5 | ||||
| -rw-r--r-- | editor/plugins/script_text_editor.cpp | 9 |
3 files changed, 12 insertions, 6 deletions
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index d918a3e24e..1e3723a911 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -270,9 +270,7 @@ void ParticlesEditor::_generate_emission_points() { Vector3 dir; dir[Math::rand() % 3] = 1.0; - Vector3 ofs = Vector3(1, 1, 1) - dir; - ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size; - ofs += aabb.position; + Vector3 ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size + aabb.position; Vector3 ofsv = ofs + aabb.size * dir; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 7c504ecc03..e8770febd9 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2072,7 +2072,10 @@ void ScriptEditor::_update_selected_editor_menu() { } } - EditorHelp *eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); + EditorHelp *eh = NULL; + if (tab_container->get_current_tab_control()) + eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); + if (eh) { script_search_menu->show(); } else { diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 1a3092b6e4..19de027287 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -75,9 +75,14 @@ void ScriptTextEditor::_load_theme_settings() { text_edit->clear_colors(); - /* keyword color */ + /* color from color_theme or from editor color */ + + Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0)); + if (EDITOR_DEF("text_editor/theme/adapted_code_editor_background_color", false)) + background_color = get_color("dark_color_1", "Editor"); - text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0))); + /* keyword color */ + text_edit->add_color_override("background_color", background_color); text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0))); text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"))); text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"))); |