Skip to content

Commit

Permalink
[bugfis] fix tint color effect with only amount definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jkb0o committed Mar 12, 2021
1 parent b966c16 commit e842952
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flash_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ Color FlashElement::parse_color(const String &p_color) const {

FlashColorEffect FlashElement::parse_color_effect(Ref<XMLParser> xml) const {
FlashColorEffect color_effect;
if (xml->has_attribute("tintColor")) {
Color tint = parse_color(xml->get_attribute_value_safe("tintColor"));
if (xml->has_attribute("tintColor") || xml->has_attribute("tintMultiplier")) {
Color tint = xml->has_attribute("tintColor") ?
parse_color(xml->get_attribute_value_safe("tintColor")) : Color(0, 0, 0, 1);
float amount = xml->has_attribute("tintMultiplier") ?
xml->get_attribute_value_safe("tintMultiplier").to_float() : 0.0;

Expand Down

0 comments on commit e842952

Please sign in to comment.