1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Added "shader" filter to "Find in Files"

This commit is contained in:
Michael Alexsander Silva Dias
2018-10-27 12:24:41 -03:00
parent d4028a3f50
commit f6d137d3d0
5 changed files with 28 additions and 16 deletions

View File

@@ -349,9 +349,9 @@ void ShaderEditor::_menu_option(int p_option) {
void ShaderEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
}
if (p_what == NOTIFICATION_DRAW) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (is_visible_in_tree())
shader_editor->get_text_edit()->grab_focus();
}
}
@@ -388,7 +388,6 @@ void ShaderEditor::_bind_methods() {
ClassDB::bind_method("_menu_option", &ShaderEditor::_menu_option);
ClassDB::bind_method("_params_changed", &ShaderEditor::_params_changed);
ClassDB::bind_method("apply_shaders", &ShaderEditor::apply_shaders);
//ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab);
}
void ShaderEditor::ensure_select_current() {
@@ -404,6 +403,11 @@ void ShaderEditor::ensure_select_current() {
}*/
}
void ShaderEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
shader_editor->goto_line_selection(p_line, p_begin, p_end);
}
void ShaderEditor::edit(const Ref<Shader> &p_shader) {
if (p_shader.is_null() || !p_shader->is_text_shader())