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:
parent
f8a4346c3d
commit
75bdc6d9be
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue