mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
TileMode opacity fix (#414)
Now opacity is multiplicative. Co-authored-by: kleonc <kleonc@users.noreply.github.com>
This commit is contained in:
parent
2eeadf35a2
commit
9edc0c9bb9
|
@ -8,7 +8,7 @@ func _draw() -> void:
|
||||||
var current_cels : Array = Global.current_project.frames[Global.current_project.current_frame].cels
|
var current_cels : Array = Global.current_project.frames[Global.current_project.current_frame].cels
|
||||||
var size : Vector2 = Global.current_project.size
|
var size : Vector2 = Global.current_project.size
|
||||||
var positions : Array = get_tile_positions(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 _position := position
|
||||||
var _scale := scale
|
var _scale := scale
|
||||||
|
@ -18,7 +18,7 @@ func _draw() -> void:
|
||||||
draw_set_transform(_position, rotation, _scale)
|
draw_set_transform(_position, rotation, _scale)
|
||||||
|
|
||||||
for i in range(Global.current_project.layers.size()):
|
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.layers[i].visible: # if it's visible
|
||||||
if Global.current_project.tile_mode:
|
if Global.current_project.tile_mode:
|
||||||
for pos in positions:
|
for pos in positions:
|
||||||
|
|
Loading…
Reference in a new issue