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:
parent
165217acc3
commit
1b9e0c1ea0
|
@ -210,9 +210,9 @@ func _dim_checker() -> void:
|
||||||
if image == null:
|
if image == null:
|
||||||
return
|
return
|
||||||
if image.is_empty() or image.is_invisible():
|
if image.is_empty() or image.is_invisible():
|
||||||
transparent_checker.self_modulate.a = 0.5
|
transparent_checker.visible = false
|
||||||
else:
|
else:
|
||||||
transparent_checker.self_modulate.a = 1.0
|
transparent_checker.visible = true
|
||||||
|
|
||||||
|
|
||||||
func _get_drag_data(_position: Vector2) -> Variant:
|
func _get_drag_data(_position: Vector2) -> Variant:
|
||||||
|
|
Loading…
Reference in a new issue