You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Added "shader" filter to "Find in Files"
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
#include "scene/gui/progress_bar.h"
|
||||
#include "scene/gui/tree.h"
|
||||
|
||||
#define ROOT_PREFIX "res://"
|
||||
|
||||
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
|
||||
const char *FindInFiles::SIGNAL_FINISHED = "finished";
|
||||
|
||||
@@ -89,7 +87,6 @@ static bool find_next(const String &line, String pattern, int from, bool match_c
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
FindInFiles::FindInFiles() {
|
||||
_root_prefix = ROOT_PREFIX;
|
||||
_searching = false;
|
||||
_whole_words = true;
|
||||
_match_case = true;
|
||||
@@ -182,7 +179,7 @@ void FindInFiles::_iterate() {
|
||||
_current_dir = _current_dir.plus_file(folder_name);
|
||||
|
||||
PoolStringArray sub_dirs;
|
||||
_scan_dir(_root_prefix + _current_dir, sub_dirs);
|
||||
_scan_dir("res://" + _current_dir, sub_dirs);
|
||||
|
||||
_folders_stack.push_back(sub_dirs);
|
||||
|
||||
@@ -348,7 +345,7 @@ FindInFilesDialog::FindInFilesDialog() {
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
|
||||
Label *prefix_label = memnew(Label);
|
||||
prefix_label->set_text(ROOT_PREFIX);
|
||||
prefix_label->set_text("res://");
|
||||
hbc->add_child(prefix_label);
|
||||
|
||||
_folder_line_edit = memnew(LineEdit);
|
||||
@@ -375,10 +372,12 @@ FindInFilesDialog::FindInFilesDialog() {
|
||||
{
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
|
||||
// TODO: Unhardcode this.
|
||||
Vector<String> exts;
|
||||
exts.push_back("gd");
|
||||
if (Engine::get_singleton()->has_singleton("GodotSharp"))
|
||||
exts.push_back("cs");
|
||||
exts.push_back("shader");
|
||||
|
||||
for (int i = 0; i < exts.size(); ++i) {
|
||||
CheckBox *cb = memnew(CheckBox);
|
||||
|
||||
Reference in New Issue
Block a user