1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Added some ambience to Splash backgrounds (#1039)

* splash ambient

* change fill to radial
This commit is contained in:
Variable 2024-07-22 16:56:03 +05:00 committed by GitHub
parent f8a4346c3d
commit 75bdc6d9be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 0 deletions

View file

@ -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.text = tr("Art by: %s") % artworks[chosen_artwork].artist_name
art_by_label.tooltip_text = artworks[chosen_artwork].artist_link art_by_label.tooltip_text = artworks[chosen_artwork].artist_link
version_text.modulate = artworks[chosen_artwork].text_modulation 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: func _on_ArtCredits_pressed() -> void:

View file

@ -128,6 +128,17 @@ size_flags_vertical = 4
texture = ExtResource("5") texture = ExtResource("5")
stretch_mode = 4 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"] [node name="ArtBy" type="HBoxContainer" parent="Contents"]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 0 theme_override_constants/separation = 0