diff --git a/src/UI/Dialogs/SplashDialog.gd b/src/UI/Dialogs/SplashDialog.gd index 29ff32ab8..5c9e4bc5f 100644 --- a/src/UI/Dialogs/SplashDialog.gd +++ b/src/UI/Dialogs/SplashDialog.gd @@ -96,6 +96,18 @@ func change_artwork(direction: int) -> void: art_by_label.text = tr("Art by: %s") % artworks[chosen_artwork].artist_name art_by_label.tooltip_text = artworks[chosen_artwork].artist_link version_text.modulate = artworks[chosen_artwork].text_modulation + # Set an ambient + var ambient = GradientTexture2D.new() + ambient.gradient = Gradient.new() + ambient.width = 100 + ambient.height = 100 + var col_a = splash_art_texturerect.texture.get_image().get_pixel(0, 0) + var col_b = Color(col_a.r, col_a.g, col_a.b, 0.5) + ambient.gradient.set_color(0, col_a) + ambient.gradient.set_color(1, col_b) + ambient.fill_from = Vector2(0.5, 0.5) + ambient.fill = GradientTexture2D.FILL_RADIAL + %Ambient.texture = ambient func _on_ArtCredits_pressed() -> void: diff --git a/src/UI/Dialogs/SplashDialog.tscn b/src/UI/Dialogs/SplashDialog.tscn index a2cdc7da7..dc7ba9d3e 100644 --- a/src/UI/Dialogs/SplashDialog.tscn +++ b/src/UI/Dialogs/SplashDialog.tscn @@ -128,6 +128,17 @@ size_flags_vertical = 4 texture = ExtResource("5") stretch_mode = 4 +[node name="Ambient" type="TextureRect" parent="Contents/SplashArt"] +unique_name_in_owner = true +show_behind_parent = true +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 + [node name="ArtBy" type="HBoxContainer" parent="Contents"] layout_mode = 2 theme_override_constants/separation = 0