diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-15 08:26:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 08:26:52 +0200 |
commit | 039f01575cde7401124b758bbae0193681e7f792 (patch) | |
tree | b26db2c2c4e3fa885ecc8d0cc45a7a1eeb5c3ec8 | |
parent | 1a5cafebc9f33ed514ec8d02be25c73ef4dd5c40 (diff) | |
parent | 37de4982caef5ad9909a87e071be3c933927cccb (diff) |
Merge pull request #40392 from touilleMan/missing-has_default_value-signals-api_json
Add missing has_default_value field for signals in api.json
-rw-r--r-- | modules/gdnative/nativescript/api_generator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index ae0b5222f0..9256b81985 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -452,6 +452,7 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) { source.push_back("\t\t\t\t\t{\n"); source.push_back("\t\t\t\t\t\t\"name\": \"" + e->get().argument_names[i] + "\",\n"); source.push_back("\t\t\t\t\t\t\"type\": \"" + e->get().argument_types[i] + "\",\n"); + source.push_back(String("\t\t\t\t\t\t\"has_default_value\": ") + (e->get().default_arguments.has(i) ? "true" : "false") + ",\n"); source.push_back("\t\t\t\t\t\t\"default_value\": \"" + (e->get().default_arguments.has(i) ? (String)e->get().default_arguments[i] : "") + "\"\n"); source.push_back(String("\t\t\t\t\t}") + ((i < e->get().argument_names.size() - 1) ? "," : "") + "\n"); } |