mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:54:44 -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
|
@ -43,9 +43,10 @@ func changed_selection() -> void:
|
|||
child.label.visible = true
|
||||
child.line_edit.visible = false
|
||||
child.line_edit.editable = false
|
||||
if Global.canvas.current_layer_index == child.i:
|
||||
if Global.canvas.current_layer_index == child.i: # The selected layer
|
||||
child.currently_selected = true
|
||||
child.pressed = true
|
||||
Global.layer_opacity_slider.value = Global.canvas.layers[child.i][4] * 100
|
||||
|
||||
if Global.canvas.current_layer_index < Global.canvas.layers.size() - 1:
|
||||
Global.move_up_layer_button.disabled = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue