protected override void PopIn() { _text.Scale = new Vector2(0f); _text.MoveTo(new Vector2(0f)); _text.Text = string.Empty; _text.AddText("Here are some mods!", x => x.Font = new FontUsage("Roboto", 100)); this.FadeInFromZero(1000, Easing.In); _text.FadeInFromZero(1000, Easing.InBack); _text.ScaleTo(1f, 1250, Easing.OutElastic); _text.MoveToOffset(new Vector2(0f, -0.25f), 1000, Easing.OutElastic); base.PopIn(); }
public override void OnEntering(IScreen last) { base.OnEntering(last); using (BeginDelayedSequence(5000)) textFlow.MoveToOffset(new Vector2(0, 250), 1000, Easing.Out); textFlow.FadeInFromZero(500).Then(4500).FadeOut(250); this.FadeInFromZero(500).Then(5000).FadeOut(250) .Finally(d => { if (nextScreen != null) { this.Push(nextScreen); } }); }
private void Load() { RelativeSizeAxes = Axes.X; Size = new Vector2(1f, 0f); AutoSizeAxes = Axes.Y; Children = new Drawable[] { parentBox = new MapPackBox { RelativePositionAxes = Axes.Both, RelativeSizeAxes = Axes.X, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Size = new Vector2(1f, YSize), Colour = Colour, Parent = true, filter = filter, Depth = 0, map = Maps[0], }, textFlowContainer = new TextFlowContainer { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, RelativePositionAxes = Axes.X, Size = new Vector2(0f, parentBox.Height), AutoSizeAxes = Axes.X, TextAnchor = Anchor.Centre, X = parentBox.X, Y = parentBox.Y, Depth = -1f, Text = string.Empty, }, textFlowContainer2 = new TextFlowContainer { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, RelativePositionAxes = Axes.X, Size = new Vector2(0f, parentBox.Height), AutoSizeAxes = Axes.X, TextAnchor = Anchor.Centre, X = parentBox.X, Y = parentBox.Y, Depth = -1f, Text = string.Empty, }, }; textFlowContainer.Colour = Color4.Black.Opacity(0.8f); textFlowContainer2.Colour = Color4.Black.Opacity(0.5f); textFlowContainer2.Height = textFlowContainer.Height = parentBox.Height; textFlowContainer.AddText($"Title: {Maps[0].Title}", x => x.Font = new FontUsage("Roboto", 30)); textFlowContainer2.AddText($"Artist: {Maps[0].Artist}", x => x.Font = new FontUsage("Roboto", 25)); textFlowContainer.MoveToOffset(new Vector2(0f, -(textFlowContainer.Height / 5))); textFlowContainer2.MoveToOffset(new Vector2(0f, (textFlowContainer2.Height / 4))); //TODO: float - int for (float i = 0; i < Maps.Length; i++) { Add(new MapPackBox((parentBox.Height * (i + 1)) - (((i + 1) * 10) - 10f)) { RelativeSizeAxes = Axes.X, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Size = new Vector2(0.9f - (i / (i + Maps.Length)), YChildSize), Colour = Color4.DarkGreen, filter = filter, map = Maps[(int)i], Invoke = InvokeBox, bindablePath = bindablePath, }); } }