aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/api_generator.cpp
diff options
context:
space:
mode:
authorThomas Herzog2017-04-11 02:25:18 +0200
committerGitHub2017-04-11 02:25:18 +0200
commit09ed1113fa78d31c72341c2b3550e554e728b1f3 (patch)
treecd0a676617c3d8d92994e0cb93bd948d6f3503f0 /modules/gdnative/api_generator.cpp
parent200c84b6b2c7557d83ec9f22fa4e995e5fc08167 (diff)
parent544940c1752d3b3b567a21c8753a7089beea4156 (diff)
downloadgodot-09ed1113fa78d31c72341c2b3550e554e728b1f3.tar.gz
godot-09ed1113fa78d31c72341c2b3550e554e728b1f3.tar.zst
godot-09ed1113fa78d31c72341c2b3550e554e728b1f3.zip
Merge pull request #8352 from karroffel/gdnative-misc-fixes
[GDNative] misc fixes
Diffstat (limited to 'modules/gdnative/api_generator.cpp')
-rw-r--r--modules/gdnative/api_generator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdnative/api_generator.cpp b/modules/gdnative/api_generator.cpp
index 8569ae078..d5f22ee7a 100644
--- a/modules/gdnative/api_generator.cpp
+++ b/modules/gdnative/api_generator.cpp
@@ -402,6 +402,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");
}