1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Hide transparent background in cel buttons if they are empty

Since changing the self_modulate no longer seems to have any effect. Changing the alpha in the shader itself would be a bad idea, since it would require every button background to have its own material, instead of sharing the same one.
This commit is contained in:
Emmanouil Papadeas 2023-12-23 21:57:18 +02:00
parent 165217acc3
commit 1b9e0c1ea0

View file

@ -210,9 +210,9 @@ func _dim_checker() -> void:
if image == null:
return
if image.is_empty() or image.is_invisible():
transparent_checker.self_modulate.a = 0.5
transparent_checker.visible = false
else:
transparent_checker.self_modulate.a = 1.0
transparent_checker.visible = true
func _get_drag_data(_position: Vector2) -> Variant: