Added a Tween to make the background UI darker when a dialog is opened

This commit is contained in:
OverloadedOrama 2020-05-08 18:37:45 +03:00
parent 51b6aadbdd
commit 7484ce1b9e
8 changed files with 58 additions and 80 deletions

View file

@ -691,6 +691,17 @@ func layer_changed(value : int) -> void:
self.current_frame = current_frame # Call frame_changed to update UI
func dialog_open(open : bool) -> void:
if open:
can_draw = false
control.get_node("ModulateTween").interpolate_property(control, "modulate", control.modulate, Color(0.5, 0.5, 0.5), 0.1, Tween.TRANS_LINEAR, Tween.EASE_OUT)
else:
can_draw = true
control.get_node("ModulateTween").interpolate_property(control, "modulate", control.modulate, Color.white, 0.1, Tween.TRANS_LINEAR, Tween.EASE_OUT)
control.get_node("ModulateTween").start()
func disable_button(button : BaseButton, disable : bool) -> void:
button.disabled = disable
if disable: