MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _update_search

Method _update_search

editor/script/script_editor_plugin.cpp:407–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void ScriptEditorQuickOpen::_update_search() {
408 search_options->clear();
409 TreeItem *root = search_options->create_item();
410
411 for (int i = 0; i < functions.size(); i++) {
412 String file = functions[i];
413 if ((search_box->get_text().is_empty() || file.containsn(search_box->get_text()))) {
414 TreeItem *ti = search_options->create_item(root);
415 ti->set_text(0, file);
416 if (root->get_first_child() == ti) {
417 ti->select(0);
418 }
419 }
420 }
421
422 get_ok_button()->set_disabled(root->get_first_child() == nullptr);
423}
424
425void ScriptEditorQuickOpen::_confirmed() {
426 TreeItem *ti = search_options->get_selected();

Callers

nothing calls this directly

Calls 10

containsnMethod · 0.80
get_first_childMethod · 0.80
sizeMethod · 0.65
clearMethod · 0.45
create_itemMethod · 0.45
is_emptyMethod · 0.45
get_textMethod · 0.45
set_textMethod · 0.45
selectMethod · 0.45
set_disabledMethod · 0.45

Tested by

no test coverage detected