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
5456void GDScriptLanguage::get_comment_delimiters (List<String> *p_delimiters) const {
@@ -942,6 +944,19 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a
942944 option.insert_text = option.display .quote (p_quote_style);
943945 r_result.insert (option.display , option);
944946 }
947+ } else if (p_annotation->name == SNAME (" @export_tool_button" )) {
948+ if (p_argument == 1 ) {
949+ const Ref<Theme> theme = EditorNode::get_singleton ()->get_editor_theme ();
950+ if (theme.is_valid ()) {
951+ List<StringName> icon_list;
952+ theme->get_icon_list (EditorStringName (EditorIcons), &icon_list);
953+ for (const StringName &E : icon_list) {
954+ ScriptLanguage::CodeCompletionOption option (E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
955+ option.insert_text = option.display .quote (p_quote_style);
956+ r_result.insert (option.display , option);
957+ }
958+ }
959+ }
945960 } else if (p_annotation->name == SNAME (" @export_custom" )) {
946961 switch (p_argument) {
947962 case 0 : {
You can’t perform that action at this time.
0 commit comments