mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 01:43:36 +00:00
Show default values in docs for GDScript built-in functions
This commit is contained in:
parent
9f3138eea9
commit
dca2ae78dd
3 changed files with 12 additions and 2 deletions
|
|
@ -1760,12 +1760,14 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
|
|||
case COLOR8: {
|
||||
|
||||
MethodInfo mi("Color8", PropertyInfo(Variant::INT, "r8"), PropertyInfo(Variant::INT, "g8"), PropertyInfo(Variant::INT, "b8"), PropertyInfo(Variant::INT, "a8"));
|
||||
mi.default_arguments.push_back(255);
|
||||
mi.return_val.type = Variant::COLOR;
|
||||
return mi;
|
||||
} break;
|
||||
case COLORN: {
|
||||
|
||||
MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::REAL, "alpha"));
|
||||
mi.default_arguments.push_back(1.0f);
|
||||
mi.return_val.type = Variant::COLOR;
|
||||
return mi;
|
||||
} break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue