background now really working

This commit is contained in:
Linus Vogel 2025-12-14 12:54:52 +01:00
parent 0e2595df60
commit ac57fe3089
3 changed files with 8 additions and 3 deletions

View File

@ -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<TextureRect>("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())

View File

@ -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=""

View File

@ -69,3 +69,4 @@ script = ExtResource("2_0e48y")
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("4_0hol4")
stretch_mode = 6