background now really working
This commit is contained in:
parent
0e2595df60
commit
ac57fe3089
@ -69,10 +69,14 @@ public partial class Projection : Window
|
|||||||
double weight = FadeTime(transition.fade_out, transition.fade_in, t);
|
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));
|
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
|
// 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
|
// update all the stars
|
||||||
foreach (Star star in mainScript.GetStars())
|
foreach (Star star in mainScript.GetStars())
|
||||||
|
|||||||
@ -9,7 +9,7 @@ custom_features=""
|
|||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path=""
|
export_path="../StarSkyPresenter.x86_64"
|
||||||
patches=PackedStringArray()
|
patches=PackedStringArray()
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
|
|||||||
@ -69,3 +69,4 @@ script = ExtResource("2_0e48y")
|
|||||||
offset_right = 40.0
|
offset_right = 40.0
|
||||||
offset_bottom = 40.0
|
offset_bottom = 40.0
|
||||||
texture = ExtResource("4_0hol4")
|
texture = ExtResource("4_0hol4")
|
||||||
|
stretch_mode = 6
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user