File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 4848#ifdef TOOLS_ENABLED
4949#include " core/config/project_settings.h"
5050#include " editor/editor_file_system.h"
51+ #include " editor/editor_node.h"
5152#include " editor/editor_settings.h"
53+ #include " editor/editor_string_names.h"
5254#endif
5355
5456Vector<String> GDScriptLanguage::get_comment_delimiters () const {
@@ -945,6 +947,19 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a
945947 option.insert_text = option.display .quote (p_quote_style);
946948 r_result.insert (option.display , option);
947949 }
950+ } else if (p_annotation->name == SNAME (" @export_tool_button" )) {
951+ if (p_argument == 1 ) {
952+ const Ref<Theme> theme = EditorNode::get_singleton ()->get_editor_theme ();
953+ if (theme.is_valid ()) {
954+ List<StringName> icon_list;
955+ theme->get_icon_list (EditorStringName (EditorIcons), &icon_list);
956+ for (const StringName &E : icon_list) {
957+ ScriptLanguage::CodeCompletionOption option (E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
958+ option.insert_text = option.display .quote (p_quote_style);
959+ r_result.insert (option.display , option);
960+ }
961+ }
962+ }
948963 } else if (p_annotation->name == SNAME (" @export_custom" )) {
949964 switch (p_argument) {
950965 case 0 : {
You can’t perform that action at this time.
0 commit comments