mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:14:42 -04:00
Layer Opacity - Change alpha of each layer
Added a slider under the layer add/remove/etc buttons that changes the currently selected layer's transparency. It gets saved in .png and .pxo files, while respecting non-opaque pixels in the image too. Which means, their alpha values aren't being overwritten.
This commit is contained in:
parent
aa860960e2
commit
ed2e757c11
7 changed files with 77 additions and 35 deletions
|
@ -46,7 +46,7 @@ func _on_PopupMenu_id_pressed(ID : int) -> void:
|
|||
sprite.lock()
|
||||
var tex := ImageTexture.new()
|
||||
tex.create_from_image(sprite, 0)
|
||||
new_canvas.layers.append([sprite, tex, layer[2], layer[3]])
|
||||
new_canvas.layers.append([sprite, tex, layer[2], layer[3], layer[4]])
|
||||
|
||||
Global.undos += 1
|
||||
Global.undo_redo.create_action("Add Frame")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue