From ac57fe3089616749a40f7b9be56b991bee8b7c34 Mon Sep 17 00:00:00 2001 From: Linus Vogel Date: Sun, 14 Dec 2025 12:54:52 +0100 Subject: [PATCH] background now really working --- Projection.cs | 8 ++++++-- export_presets.cfg | 2 +- node_2d.tscn | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Projection.cs b/Projection.cs index dc7d0ea..a10e9d6 100644 --- a/Projection.cs +++ b/Projection.cs @@ -69,10 +69,14 @@ public partial class Projection : Window double weight = FadeTime(transition.fade_out, transition.fade_in, t); Vector2 posWeight = new Vector2((float)Fapply(weight * 3.14159265 / 2, yFade), (float)Fapply(weight * 3.14159265 / 2, xFade)); - GD.Print("T: " + t + ", weight: " + weight + ", posWeight: " + posWeight); + //GD.Print("T: " + t + ", weight: " + weight + ", posWeight: " + posWeight); // update background - // TODO: update background + var background = this.GetNode("Background"); + float scaleX = background.Texture.GetWidth() / (float)this.GetSize().X; + float scaleY = background.Texture.GetHeight() / (float)this.GetSize().Y; + background.Scale = Vector2.One / Math.Min(scaleX, scaleY); + // update all the stars foreach (Star star in mainScript.GetStars()) diff --git a/export_presets.cfg b/export_presets.cfg index fc5b539..7ab724f 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -9,7 +9,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="" +export_path="../StarSkyPresenter.x86_64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" diff --git a/node_2d.tscn b/node_2d.tscn index 30dc647..8439d26 100644 --- a/node_2d.tscn +++ b/node_2d.tscn @@ -69,3 +69,4 @@ script = ExtResource("2_0e48y") offset_right = 40.0 offset_bottom = 40.0 texture = ExtResource("4_0hol4") +stretch_mode = 6