You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add static method support to core Variant types
* Properly exposed, including validated and variant call * Bound static functions in String and Color * Did not add support for scripting languages, will have to be added manually.
This commit is contained in:
@@ -394,13 +394,22 @@ void DocTools::generate(bool p_basic_types) {
|
||||
method.qualifiers += " ";
|
||||
}
|
||||
method.qualifiers += "const";
|
||||
} else if (E->get().flags & METHOD_FLAG_VARARG) {
|
||||
}
|
||||
|
||||
if (E->get().flags & METHOD_FLAG_VARARG) {
|
||||
if (method.qualifiers != "") {
|
||||
method.qualifiers += " ";
|
||||
}
|
||||
method.qualifiers += "vararg";
|
||||
}
|
||||
|
||||
if (E->get().flags & METHOD_FLAG_STATIC) {
|
||||
if (method.qualifiers != "") {
|
||||
method.qualifiers += " ";
|
||||
}
|
||||
method.qualifiers += "static";
|
||||
}
|
||||
|
||||
for (int i = -1; i < E->get().arguments.size(); i++) {
|
||||
if (i == -1) {
|
||||
#ifdef DEBUG_METHODS_ENABLED
|
||||
@@ -647,6 +656,20 @@ void DocTools::generate(bool p_basic_types) {
|
||||
method.qualifiers += "vararg";
|
||||
}
|
||||
|
||||
if (mi.flags & METHOD_FLAG_CONST) {
|
||||
if (method.qualifiers != "") {
|
||||
method.qualifiers += " ";
|
||||
}
|
||||
method.qualifiers += "const";
|
||||
}
|
||||
|
||||
if (mi.flags & METHOD_FLAG_STATIC) {
|
||||
if (method.qualifiers != "") {
|
||||
method.qualifiers += " ";
|
||||
}
|
||||
method.qualifiers += "static";
|
||||
}
|
||||
|
||||
c.methods.push_back(method);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user