From 1b9e0c1ea0c8366bca7f661676981a92a43756d6 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sat, 23 Dec 2023 21:57:18 +0200 Subject: [PATCH] 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. --- src/UI/Timeline/CelButton.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Timeline/CelButton.gd b/src/UI/Timeline/CelButton.gd index db3114439..3d804a20c 100644 --- a/src/UI/Timeline/CelButton.gd +++ b/src/UI/Timeline/CelButton.gd @@ -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: