From 9edc0c9bb937955b6b153ae73bc0468ca6a0bd85 Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Wed, 30 Dec 2020 18:56:28 +0100 Subject: [PATCH] TileMode opacity fix (#414) Now opacity is multiplicative. Co-authored-by: kleonc --- src/UI/Canvas/TileMode.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Canvas/TileMode.gd b/src/UI/Canvas/TileMode.gd index d630f385c..0967ca741 100644 --- a/src/UI/Canvas/TileMode.gd +++ b/src/UI/Canvas/TileMode.gd @@ -8,7 +8,7 @@ func _draw() -> void: var current_cels : Array = Global.current_project.frames[Global.current_project.current_frame].cels var size : Vector2 = Global.current_project.size var positions : Array = get_tile_positions(size) - var tilemode_opacity = 1.0 - Global.tilemode_opacity + var tilemode_opacity := Global.tilemode_opacity var _position := position var _scale := scale @@ -18,7 +18,7 @@ func _draw() -> void: draw_set_transform(_position, rotation, _scale) for i in range(Global.current_project.layers.size()): - var modulate_color := Color(1, 1, 1, current_cels[i].opacity - tilemode_opacity) + var modulate_color := Color(1, 1, 1, current_cels[i].opacity * tilemode_opacity) if Global.current_project.layers[i].visible: # if it's visible if Global.current_project.tile_mode: for pos in positions: