summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2019-07-18 20:15:39 -0400
committerAaron Franke <arnfranke@yahoo.com>2020-04-29 14:41:12 -0400
commit90df1d67cbc06f2742c11dad57ca940b9ed7c0d4 (patch)
tree9278f835567e6bdb535b4b7e5c2a242faa7fca5d /modules/mono
parent92d4a0cbd231508221b0e977ae9a0e9d4207e328 (diff)
Color with alpha constructor
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index facaf74606..6030b72a44 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -420,7 +420,7 @@ namespace Godot
return txt;
}
- // Constructors
+ // Constructors
public Color(float r, float g, float b, float a = 1.0f)
{
this.r = r;
@@ -429,6 +429,14 @@ namespace Godot
this.a = a;
}
+ public Color(Color c, float a = 1.0f)
+ {
+ r = c.r;
+ g = c.g;
+ b = c.b;
+ this.a = a;
+ }
+
public Color(uint rgba)
{
a = (rgba & 0xFF) / 255.0f;