Add Color + alpha constructor for Color

This commit is contained in:
Haoyu Qiu
2023-03-16 14:51:40 +08:00
parent 26a584179c
commit 3544cd1dad
2 changed files with 14 additions and 5 deletions

View File

@@ -40,6 +40,17 @@
[/codeblock]
</description>
</method>
<method name="Color">
<return type="Color" />
<argument index="0" name="from" type="Color" />
<argument index="1" name="alpha" type="float" />
<description>
Constructs a color from the existing color, with [member a] set to the given [code]alpha[/code] value.
[codeblock]
var red = Color(Color.red, 0.2) # 20% opaque red.
[/codeblock]
</description>
</method>
<method name="Color">
<return type="Color" />
<argument index="0" name="r" type="float" />