diff options
author | Marcelo Fernandez <marcelofg55@gmail.com> | 2017-10-19 12:36:06 -0300 |
---|---|---|
committer | Marcelo Fernandez <marcelofg55@gmail.com> | 2017-10-19 12:36:06 -0300 |
commit | d3a039cb2f3fd56325f742c06651ea3eaf5e66ba (patch) | |
tree | 52b4af57de91a2ea033c2c5029f5a673be5df3fa /core/variant_op.cpp | |
parent | 6a363ad4704cbfa916b0e10491855221a4680b8e (diff) |
Fix Color.r8/g8/b8/a8 being type float instead of type int
Diffstat (limited to 'core/variant_op.cpp')
-rw-r--r-- | core/variant_op.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 03ec336291..6362090902 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1655,13 +1655,13 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { } else if (p_index == CoreStringNames::singleton->a) { return v->a; } else if (p_index == CoreStringNames::singleton->r8) { - return v->r * 255.0; + return int(v->r * 255.0); } else if (p_index == CoreStringNames::singleton->g8) { - return v->g * 255.0; + return int(v->g * 255.0); } else if (p_index == CoreStringNames::singleton->b8) { - return v->b * 255.0; + return int(v->b * 255.0); } else if (p_index == CoreStringNames::singleton->a8) { - return v->a * 255.0; + return int(v->a * 255.0); } else if (p_index == CoreStringNames::singleton->h) { return v->get_h(); } else if (p_index == CoreStringNames::singleton->s) { |