Skip to content

Commit

Permalink
Updated colorize
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Mar 21, 2024
1 parent 30c7b7f commit a54108e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dn/heaps/slib/HSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ class HSprite extends h2d.Drawable implements SpriteInterface {
}

public inline function colorize(col:Col, ?alpha=1.0) {
color.setColor(dn.legacy.Color.addAlphaF(col, alpha));
color.setColor( col.withAlpha(alpha) );
}

public inline function uncolorize() {
color.set(1,1,1,1);
}
Expand Down

0 comments on commit a54108e

Please sign in to comment.