summaryrefslogtreecommitdiffstats
path: root/core/color.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/color.h')
-rw-r--r--core/color.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/color.h b/core/color.h
index d95e80f5da..8b689fdde1 100644
--- a/core/color.h
+++ b/core/color.h
@@ -205,7 +205,7 @@ struct Color {
operator String() const;
/**
- * No construct parameters, r=0, g=0, b=0. a=255
+ * No construct parameters, r=0, g=0, b=0. a=1
*/
_FORCE_INLINE_ Color() {
r = 0;
@@ -223,6 +223,16 @@ struct Color {
b = p_b;
a = p_a;
}
+
+ /**
+ * Construct a Color from another Color, but with the specified alpha value.
+ */
+ _FORCE_INLINE_ Color(const Color &p_c, float p_a) {
+ r = p_c.r;
+ g = p_c.g;
+ b = p_c.b;
+ a = p_a;
+ }
};
bool Color::operator<(const Color &p_color) const {