diff --git a/material_maker/darken.gd b/material_maker/darken.gd index 48bc3e01c..25e40d64b 100644 --- a/material_maker/darken.gd +++ b/material_maker/darken.gd @@ -3,7 +3,9 @@ extends ColorRect func _ready(): var current_theme : Theme = mm_globals.main_window.theme color = current_theme.get_stylebox("panel", "Panel").bg_color - color.a = 0.80 + modulate.a = 0.0 + var tween = get_tree().create_tween() + tween.tween_property(self, "modulate:a", 0.8, 0.5).set_trans(Tween.TRANS_CUBIC) _on_resized() func _on_resized(): diff --git a/material_maker/darken.tscn b/material_maker/darken.tscn index 3e59f8ab1..4f107f881 100644 --- a/material_maker/darken.tscn +++ b/material_maker/darken.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://cmeh4ewlvp7vx"] -[ext_resource type="Script" path="res://material_maker/darken.gd" id="1"] +[ext_resource type="Script" uid="uid://du7vv67kc65qb" path="res://material_maker/darken.gd" id="1"] [node name="Darken" type="ColorRect"] anchor_right = 1.0 diff --git a/material_maker/main_window.gd b/material_maker/main_window.gd index c5e4389eb..1c4d71966 100644 --- a/material_maker/main_window.gd +++ b/material_maker/main_window.gd @@ -1189,7 +1189,7 @@ func bug_report() -> void: func about() -> void: var about_box = preload("res://material_maker/windows/about/about.tscn").instantiate() - add_child(about_box) + add_dialog(about_box) about_box.hide() about_box.popup_centered() @@ -1431,6 +1431,10 @@ func add_dialog(dialog : Window): if mm_globals.get_config("dialog_dim_background"): add_child(background) dialog.tree_exited.connect(background.queue_free) + dialog.tree_exited.connect(func(): + var tween := get_tree().create_tween() + tween.tween_property(background, "modulate:a", 0.0, 0.3).set_trans(Tween.TRANS_CUBIC) + tween.tween_callback(background.queue_free)) add_child(dialog) # Accept dialog