mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Update framework and fix compilation
Most issues were related to BeginLoopedSequence usage and lack of "this." in front of transform helpers.
This commit is contained in:
parent
fd58c6e835
commit
a5e610a7ba
@ -1 +1 @@
|
|||||||
Subproject commit 991177da4fbed2dd8260c215f2d341ebc858b03e
|
Subproject commit cb2c9dd8b6213cd8f91cc37892da6335ca3bce10
|
@ -15,6 +15,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Framework.Lists;
|
using osu.Framework.Lists;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -59,20 +60,13 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
using (container.BeginLoopedSequence())
|
// Move box along a square trajectory
|
||||||
{
|
container.Loop(b => b
|
||||||
container.MoveTo(new Vector2(0, 100), duration);
|
.MoveTo(new Vector2(0, 100), duration)
|
||||||
using (container.BeginDelayedSequence(duration))
|
.Then().MoveTo(new Vector2(100, 100), duration)
|
||||||
{
|
.Then().MoveTo(new Vector2(100, 0), duration)
|
||||||
container.MoveTo(new Vector2(100, 100), duration);
|
.Then().MoveTo(Vector2.Zero, duration)
|
||||||
using (container.BeginDelayedSequence(duration))
|
);
|
||||||
{
|
|
||||||
container.MoveTo(new Vector2(100, 0), duration);
|
|
||||||
using (container.BeginDelayedSequence(duration))
|
|
||||||
container.MoveTo(Vector2.Zero, duration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MyContextMenuContainer : Container, IHasContextMenu
|
private class MyContextMenuContainer : Container, IHasContextMenu
|
||||||
@ -95,10 +89,10 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
new OsuContextMenuItem(@"Simple option"),
|
new OsuContextMenuItem(@"Simple option"),
|
||||||
new OsuContextMenuItem(@"Simple very very long option"),
|
new OsuContextMenuItem(@"Simple very very long option"),
|
||||||
new OsuContextMenuItem(@"Change width", MenuItemType.Highlighted) { Action = () => ResizeWidthTo(Width * 2, 100, EasingTypes.OutQuint) },
|
new OsuContextMenuItem(@"Change width", MenuItemType.Highlighted) { Action = () => this.ResizeWidthTo(Width * 2, 100, EasingTypes.OutQuint) },
|
||||||
new OsuContextMenuItem(@"Change height", MenuItemType.Highlighted) { Action = () => ResizeHeightTo(Height * 2, 100, EasingTypes.OutQuint) },
|
new OsuContextMenuItem(@"Change height", MenuItemType.Highlighted) { Action = () => this.ResizeHeightTo(Height * 2, 100, EasingTypes.OutQuint) },
|
||||||
new OsuContextMenuItem(@"Change width back", MenuItemType.Destructive) { Action = () => ResizeWidthTo(Width / 2, 100, EasingTypes.OutQuint) },
|
new OsuContextMenuItem(@"Change width back", MenuItemType.Destructive) { Action = () => this.ResizeWidthTo(Width / 2, 100, EasingTypes.OutQuint) },
|
||||||
new OsuContextMenuItem(@"Change height back", MenuItemType.Destructive) { Action = () => ResizeHeightTo(Height / 2, 100, EasingTypes.OutQuint) },
|
new OsuContextMenuItem(@"Change height back", MenuItemType.Destructive) { Action = () => this.ResizeHeightTo(Height / 2, 100, EasingTypes.OutQuint) },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ using osu.Framework.MathUtils;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -196,7 +197,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
FadeInFromZero(250, EasingTypes.OutQuint);
|
this.FadeInFromZero(250, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Desktop.Overlays
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
FadeIn(1000);
|
this.FadeIn(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
@ -17,7 +17,6 @@ using System.Collections.Generic;
|
|||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Timing;
|
using osu.Game.Rulesets.Timing;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
@ -235,7 +234,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
private void transformVisibleTimeRangeTo(double newTimeRange, double duration = 0, EasingTypes easing = EasingTypes.None)
|
private void transformVisibleTimeRangeTo(double newTimeRange, double duration = 0, EasingTypes easing = EasingTypes.None)
|
||||||
{
|
{
|
||||||
TransformTo(newTimeRange, duration, easing, new TransformTimeSpan());
|
this.TransformTo(newTimeRange, duration, easing, new TransformTimeSpan(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
@ -245,22 +244,14 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
barLineContainer.Width = columns.Width;
|
barLineContainer.Width = columns.Width;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TransformTimeSpan : Transform<double, Drawable>
|
private class TransformTimeSpan : TransformDouble<ManiaPlayfield>
|
||||||
{
|
{
|
||||||
public double CurrentValue
|
public TransformTimeSpan(ManiaPlayfield target) : base(target)
|
||||||
{
|
{
|
||||||
get
|
|
||||||
{
|
|
||||||
double time = Time?.Current ?? 0;
|
|
||||||
if (time < StartTime) return StartValue;
|
|
||||||
if (time >= EndTime) return EndValue;
|
|
||||||
|
|
||||||
return Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Apply(Drawable d) => ((ManiaPlayfield)d).visibleTimeRange.Value = (float)CurrentValue;
|
public override void Apply(ManiaPlayfield d) => d.visibleTimeRange.Value = CurrentValue;
|
||||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((ManiaPlayfield)d).visibleTimeRange.Value;
|
public override void ReadIntoStartValue(ManiaPlayfield d) => StartValue = d.visibleTimeRange.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,12 +119,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
using (BeginDelayedSequence(duration + TIME_PREEMPT))
|
using (BeginDelayedSequence(duration + TIME_PREEMPT))
|
||||||
FadeOut(TIME_FADEOUT);
|
this.FadeOut(TIME_FADEOUT);
|
||||||
Expire(true);
|
Expire(true);
|
||||||
break;
|
break;
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
ApproachCircle.FadeOut(50);
|
ApproachCircle.FadeOut(50);
|
||||||
FadeOut(TIME_FADEOUT / 5);
|
this.FadeOut(TIME_FADEOUT / 5);
|
||||||
Expire();
|
Expire();
|
||||||
break;
|
break;
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
@ -145,8 +145,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
circle.FadeOut();
|
circle.FadeOut();
|
||||||
number.FadeOut();
|
number.FadeOut();
|
||||||
|
|
||||||
FadeOut(800);
|
this.FadeOut(800);
|
||||||
ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
|
this.ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Judgements;
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -44,7 +45,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected virtual void UpdatePreemptState()
|
protected virtual void UpdatePreemptState()
|
||||||
{
|
{
|
||||||
FadeIn(TIME_FADEIN);
|
this.FadeIn(TIME_FADEIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void UpdateCurrentState(ArmedState state)
|
protected virtual void UpdateCurrentState(ArmedState state)
|
||||||
|
@ -163,7 +163,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
body.FadeOut(160);
|
body.FadeOut(160);
|
||||||
ball.FadeOut(160);
|
ball.FadeOut(160);
|
||||||
|
|
||||||
FadeOut(800);
|
this.FadeOut(800);
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
|
@ -62,12 +62,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
var animIn = Math.Min(150, sliderTick.StartTime - FadeInTime);
|
var animIn = Math.Min(150, sliderTick.StartTime - FadeInTime);
|
||||||
|
|
||||||
ScaleTo(0.5f);
|
this.ScaleTo(0.5f);
|
||||||
ScaleTo(1.2f, animIn);
|
this.ScaleTo(1.2f, animIn);
|
||||||
FadeIn(animIn);
|
this.FadeIn(animIn);
|
||||||
|
|
||||||
Delay(animIn);
|
Delay(animIn);
|
||||||
ScaleTo(1, 150, EasingTypes.Out);
|
this.ScaleTo(1, 150, EasingTypes.Out);
|
||||||
|
|
||||||
Delay(-animIn);
|
Delay(-animIn);
|
||||||
}
|
}
|
||||||
@ -78,15 +78,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
Delay(FadeOutTime - sliderTick.StartTime);
|
Delay(FadeOutTime - sliderTick.StartTime);
|
||||||
FadeOut();
|
this.FadeOut();
|
||||||
break;
|
break;
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
FadeOut(160);
|
this.FadeOut(160);
|
||||||
FadeColour(Color4.Red, 80);
|
this.FadeColour(Color4.Red, 80);
|
||||||
break;
|
break;
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
FadeOut(120, EasingTypes.OutQuint);
|
this.FadeOut(120, EasingTypes.OutQuint);
|
||||||
ScaleTo(Scale * 1.5f, 120, EasingTypes.OutQuint);
|
this.ScaleTo(Scale * 1.5f, 120, EasingTypes.OutQuint);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,16 +200,16 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
Delay(spinner.Duration, true);
|
Delay(spinner.Duration, true);
|
||||||
|
|
||||||
FadeOut(160);
|
this.FadeOut(160);
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
ScaleTo(Scale * 1.2f, 320, EasingTypes.Out);
|
this.ScaleTo(Scale * 1.2f, 320, EasingTypes.Out);
|
||||||
Expire();
|
Expire();
|
||||||
break;
|
break;
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
ScaleTo(Scale * 0.8f, 320, EasingTypes.In);
|
this.ScaleTo(Scale * 0.8f, 320, EasingTypes.In);
|
||||||
Expire();
|
Expire();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
using (icon.BeginLoopedSequence())
|
icon.Spin(1000);
|
||||||
icon.RotateTo(360, 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProgress(double progress, int repeat)
|
public void UpdateProgress(double progress, int repeat)
|
||||||
|
@ -133,7 +133,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
background.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint);
|
background.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
RotateTo(currentRotation / 2, validAndTracking ? 500 : 1500, EasingTypes.OutExpo);
|
this.RotateTo(currentRotation / 2, validAndTracking ? 500 : 1500, EasingTypes.OutExpo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
Delay(BarLine.StartTime - Time.Current);
|
Delay(BarLine.StartTime - Time.Current);
|
||||||
FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000);
|
this.FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateScrollPosition(double time) => MoveToX((float)((BarLine.StartTime - time) / BarLine.ScrollTime));
|
private void updateScrollPosition(double time) => this.MoveToX((float)((BarLine.StartTime - time) / BarLine.ScrollTime));
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
|
@ -77,10 +77,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
Delay(HitObject.HitWindowMiss);
|
Delay(HitObject.HitWindowMiss);
|
||||||
break;
|
break;
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
FadeOut(100);
|
this.FadeOut(100);
|
||||||
break;
|
break;
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
FadeOut(600);
|
this.FadeOut(600);
|
||||||
|
|
||||||
var flash = circlePiece?.FlashBox;
|
var flash = circlePiece?.FlashBox;
|
||||||
if (flash != null)
|
if (flash != null)
|
||||||
@ -90,16 +90,16 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FadeOut(800);
|
this.FadeOut(800);
|
||||||
|
|
||||||
const float gravity_time = 300;
|
const float gravity_time = 300;
|
||||||
const float gravity_travel_height = 200;
|
const float gravity_travel_height = 200;
|
||||||
|
|
||||||
Content.ScaleTo(0.8f, gravity_time * 2, EasingTypes.OutQuad);
|
Content.ScaleTo(0.8f, gravity_time * 2, EasingTypes.OutQuad);
|
||||||
|
|
||||||
MoveToY(-gravity_travel_height, gravity_time, EasingTypes.Out);
|
this.MoveToY(-gravity_travel_height, gravity_time, EasingTypes.Out);
|
||||||
Delay(gravity_time, true);
|
Delay(gravity_time, true);
|
||||||
MoveToY(gravity_travel_height * 2, gravity_time * 2, EasingTypes.In);
|
this.MoveToY(gravity_travel_height * 2, gravity_time * 2, EasingTypes.In);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FadeOut(out_transition_time, EasingTypes.Out);
|
this.FadeOut(out_transition_time, EasingTypes.Out);
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.UI
|
namespace osu.Game.Rulesets.Taiko.UI
|
||||||
{
|
{
|
||||||
@ -47,7 +48,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
switch (Judgement.Result)
|
switch (Judgement.Result)
|
||||||
{
|
{
|
||||||
case HitResult.Hit:
|
case HitResult.Hit:
|
||||||
MoveToY(-100, 500);
|
this.MoveToY(-100, 500);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ScaleTo(3f, 1000, EasingTypes.OutQuint);
|
this.ScaleTo(3f, 1000, EasingTypes.OutQuint);
|
||||||
FadeOut(500);
|
this.FadeOut(500);
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void VisualiseSecondHit()
|
public void VisualiseSecondHit()
|
||||||
{
|
{
|
||||||
ResizeTo(new Vector2(TaikoPlayfield.HIT_TARGET_OFFSET + TaikoHitObject.DEFAULT_STRONG_CIRCLE_DIAMETER), 50);
|
this.ResizeTo(new Vector2(TaikoPlayfield.HIT_TARGET_OFFSET + TaikoHitObject.DEFAULT_STRONG_CIRCLE_DIAMETER), 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ScaleTo(new Vector2(1, 3f), 500, EasingTypes.OutQuint);
|
this.ScaleTo(new Vector2(1, 3f), 500, EasingTypes.OutQuint);
|
||||||
FadeOut(250);
|
this.FadeOut(250);
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
|
@ -64,9 +64,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state == PanelSelectedState.Hidden)
|
if (state == PanelSelectedState.Hidden)
|
||||||
FadeOut(300, EasingTypes.OutQuint);
|
this.FadeOut(300, EasingTypes.OutQuint);
|
||||||
else
|
else
|
||||||
FadeIn(250);
|
this.FadeIn(250);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PanelSelectedState state = PanelSelectedState.NotSelected;
|
private PanelSelectedState state = PanelSelectedState.NotSelected;
|
||||||
|
@ -83,13 +83,13 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
instantMovement |= !IsPresent;
|
instantMovement |= !IsPresent;
|
||||||
FadeIn(500, EasingTypes.OutQuint);
|
this.FadeIn(500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
using (BeginDelayedSequence(150))
|
using (BeginDelayedSequence(150))
|
||||||
FadeOut(500, EasingTypes.OutQuint);
|
this.FadeOut(500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Move(Vector2 pos)
|
public override void Move(Vector2 pos)
|
||||||
@ -101,7 +101,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MoveTo(pos, 200, EasingTypes.OutQuint);
|
this.MoveTo(pos, 200, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,8 @@ namespace osu.Game.Graphics
|
|||||||
/// <param name="newColour">The new accent colour.</param>
|
/// <param name="newColour">The new accent colour.</param>
|
||||||
/// <param name="duration">The tween duration.</param>
|
/// <param name="duration">The tween duration.</param>
|
||||||
/// <param name="easing">The tween easing.</param>
|
/// <param name="easing">The tween easing.</param>
|
||||||
public static void FadeAccent<T>(this T accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
|
public static TransformContinuation<T> FadeAccent<T>(this T accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
|
||||||
where T : Transformable<Drawable>, IHasAccentColour
|
where T : IHasAccentColour
|
||||||
{
|
=> accentedDrawable.TransformTo(newColour, duration, easing, new TransformAccent(accentedDrawable));
|
||||||
accentedDrawable.TransformTo(newColour, duration, easing, new TransformAccent());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,17 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Transforms
|
namespace osu.Game.Graphics.Transforms
|
||||||
{
|
{
|
||||||
public class TransformAccent : Transform<Color4, Drawable>
|
public class TransformAccent : Transform<Color4, IHasAccentColour>
|
||||||
{
|
{
|
||||||
|
public TransformAccent(IHasAccentColour target) : base(target)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Current value of the transformed colour in linear colour space.
|
/// Current value of the transformed colour in linear colour space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -25,7 +28,7 @@ namespace osu.Game.Graphics.Transforms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Apply(Drawable d) => ((IHasAccentColour)d).AccentColour = CurrentValue;
|
public override void Apply(IHasAccentColour d) => d.AccentColour = CurrentValue;
|
||||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((IHasAccentColour)d).AccentColour;
|
public override void ReadIntoStartValue(IHasAccentColour d) => StartValue = d.AccentColour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,13 +54,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
if (State == Visibility.Visible)
|
if (State == Visibility.Visible)
|
||||||
{
|
{
|
||||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||||
ScaleTo(new Vector2(1f), transition_duration, EasingTypes.OutQuint);
|
this.ScaleTo(new Vector2(1f), transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FadeOut(transition_duration, EasingTypes.OutQuint);
|
this.FadeOut(transition_duration, EasingTypes.OutQuint);
|
||||||
ScaleTo(new Vector2(0.8f, 1f), transition_duration, EasingTypes.OutQuint);
|
this.ScaleTo(new Vector2(0.8f, 1f), transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,14 +34,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
using (spinner.BeginLoopedSequence())
|
spinner.Spin(2000);
|
||||||
spinner.RotateTo(360, 2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private const float transition_duration = 500;
|
private const float transition_duration = 500;
|
||||||
|
|
||||||
protected override void PopIn() => FadeIn(transition_duration * 5, EasingTypes.OutQuint);
|
protected override void PopIn() => this.FadeIn(transition_duration * 5, EasingTypes.OutQuint);
|
||||||
|
|
||||||
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.OutQuint);
|
protected override void PopOut() => this.FadeOut(transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,13 +80,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
FadeColour(GlowingAccentColour, 500, EasingTypes.OutQuint);
|
this.FadeColour(GlowingAccentColour, 500, EasingTypes.OutQuint);
|
||||||
FadeEdgeEffectTo(1, 500, EasingTypes.OutQuint);
|
FadeEdgeEffectTo(1, 500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FadeEdgeEffectTo(0, 500);
|
FadeEdgeEffectTo(0, 500);
|
||||||
FadeColour(AccentColour, 500);
|
this.FadeColour(AccentColour, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Background.Colour = colours.ContextMenuGray;
|
Background.Colour = colours.ContextMenuGray;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AnimateOpen() => FadeIn(fade_duration, EasingTypes.OutQuint);
|
protected override void AnimateOpen() => this.FadeIn(fade_duration, EasingTypes.OutQuint);
|
||||||
protected override void AnimateClose() => FadeOut(fade_duration, EasingTypes.OutQuint);
|
protected override void AnimateClose() => this.FadeOut(fade_duration, EasingTypes.OutQuint);
|
||||||
|
|
||||||
protected override void UpdateContentHeight()
|
protected override void UpdateContentHeight()
|
||||||
{
|
{
|
||||||
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
||||||
ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,14 +19,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
ItemsContainer.Padding = new MarginPadding(5);
|
ItemsContainer.Padding = new MarginPadding(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AnimateOpen() => FadeIn(300, EasingTypes.OutQuint);
|
protected override void AnimateOpen() => this.FadeIn(300, EasingTypes.OutQuint);
|
||||||
|
|
||||||
protected override void AnimateClose() => FadeOut(300, EasingTypes.OutQuint);
|
protected override void AnimateClose() => this.FadeOut(300, EasingTypes.OutQuint);
|
||||||
|
|
||||||
protected override void UpdateContentHeight()
|
protected override void UpdateContentHeight()
|
||||||
{
|
{
|
||||||
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
||||||
ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Transforms;
|
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Transforms;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Transforms;
|
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Transforms;
|
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
|
@ -173,7 +173,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
ResizeTo(SIZE_EXTENDED, transform_time, EasingTypes.OutElastic);
|
this.ResizeTo(SIZE_EXTENDED, transform_time, EasingTypes.OutElastic);
|
||||||
IconLayer.FadeColour(HoverColour, transform_time, EasingTypes.OutElastic);
|
IconLayer.FadeColour(HoverColour, transform_time, EasingTypes.OutElastic);
|
||||||
|
|
||||||
bouncingIcon.ScaleTo(1.1f, transform_time, EasingTypes.OutElastic);
|
bouncingIcon.ScaleTo(1.1f, transform_time, EasingTypes.OutElastic);
|
||||||
@ -183,7 +183,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
ResizeTo(SIZE_RETRACTED, transform_time, EasingTypes.OutElastic);
|
this.ResizeTo(SIZE_RETRACTED, transform_time, EasingTypes.OutElastic);
|
||||||
IconLayer.FadeColour(TextLayer.Colour, transform_time, EasingTypes.OutElastic);
|
IconLayer.FadeColour(TextLayer.Colour, transform_time, EasingTypes.OutElastic);
|
||||||
|
|
||||||
bouncingIcon.ScaleTo(1, transform_time, EasingTypes.OutElastic);
|
bouncingIcon.ScaleTo(1, transform_time, EasingTypes.OutElastic);
|
||||||
|
@ -93,14 +93,14 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
|||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
ClearTransforms();
|
ClearTransforms();
|
||||||
FadeIn(100);
|
this.FadeIn(100);
|
||||||
|
|
||||||
schedulePopOut();
|
schedulePopOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
FadeOut(100);
|
this.FadeOut(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void schedulePopOut()
|
private void schedulePopOut()
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
FadeTo(value ? 1f : 0f, 100);
|
this.FadeTo(value ? 1f : 0f, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,14 +175,14 @@ namespace osu.Game.Overlays.Chat
|
|||||||
joinedCheckmark.FadeTo(1f, transition_duration);
|
joinedCheckmark.FadeTo(1f, transition_duration);
|
||||||
topic.FadeTo(0.8f, transition_duration);
|
topic.FadeTo(0.8f, transition_duration);
|
||||||
topic.FadeColour(Color4.White, transition_duration);
|
topic.FadeColour(Color4.White, transition_duration);
|
||||||
FadeColour(joinedColour, transition_duration);
|
this.FadeColour(joinedColour, transition_duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
joinedCheckmark.FadeTo(0f, transition_duration);
|
joinedCheckmark.FadeTo(0f, transition_duration);
|
||||||
topic.FadeTo(1f, transition_duration);
|
topic.FadeTo(1f, transition_duration);
|
||||||
topic.FadeColour(topicColour, transition_duration);
|
topic.FadeColour(topicColour, transition_duration);
|
||||||
FadeColour(Color4.White, transition_duration);
|
this.FadeColour(Color4.White, transition_duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
FadeTo(value ? 1f : 0f, 100);
|
this.FadeTo(value ? 1f : 0f, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,10 +158,10 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
if (Alpha == 0) MoveToY(DrawHeight);
|
if (Alpha == 0) this.MoveToY(DrawHeight);
|
||||||
|
|
||||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||||
MoveToY(0, transition_duration, EasingTypes.OutQuint);
|
this.MoveToY(0, transition_duration, EasingTypes.OutQuint);
|
||||||
|
|
||||||
search.HoldFocus = true;
|
search.HoldFocus = true;
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
@ -169,8 +169,8 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
FadeOut(transition_duration, EasingTypes.InSine);
|
this.FadeOut(transition_duration, EasingTypes.InSine);
|
||||||
MoveToY(DrawHeight, transition_duration, EasingTypes.InSine);
|
this.MoveToY(DrawHeight, transition_duration, EasingTypes.InSine);
|
||||||
|
|
||||||
search.HoldFocus = false;
|
search.HoldFocus = false;
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
private void fadeActive()
|
private void fadeActive()
|
||||||
{
|
{
|
||||||
ResizeTo(new Vector2(Width, 1.1f), transition_length, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(Width, 1.1f), transition_length, EasingTypes.OutQuint);
|
||||||
|
|
||||||
box.FadeColour(backgroundActive, transition_length, EasingTypes.OutQuint);
|
box.FadeColour(backgroundActive, transition_length, EasingTypes.OutQuint);
|
||||||
highlightBox.FadeIn(transition_length, EasingTypes.OutQuint);
|
highlightBox.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||||
@ -97,7 +97,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
private void fadeInactive()
|
private void fadeInactive()
|
||||||
{
|
{
|
||||||
ResizeTo(new Vector2(Width, 1), transition_length, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(Width, 1), transition_length, EasingTypes.OutQuint);
|
||||||
|
|
||||||
box.FadeColour(backgroundInactive, transition_length, EasingTypes.OutQuint);
|
box.FadeColour(backgroundInactive, transition_length, EasingTypes.OutQuint);
|
||||||
highlightBox.FadeOut(transition_length, EasingTypes.OutQuint);
|
highlightBox.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||||
|
@ -235,8 +235,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
MoveToY(0, transition_length, EasingTypes.OutQuint);
|
this.MoveToY(0, transition_length, EasingTypes.OutQuint);
|
||||||
FadeIn(transition_length, EasingTypes.OutQuint);
|
this.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||||
|
|
||||||
inputTextBox.HoldFocus = true;
|
inputTextBox.HoldFocus = true;
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
@ -244,8 +244,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
MoveToY(Height, transition_length, EasingTypes.InSine);
|
this.MoveToY(Height, transition_length, EasingTypes.InSine);
|
||||||
FadeOut(transition_length, EasingTypes.InSine);
|
this.FadeOut(transition_length, EasingTypes.InSine);
|
||||||
|
|
||||||
inputTextBox.HoldFocus = false;
|
inputTextBox.HoldFocus = false;
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
@ -45,13 +45,13 @@ namespace osu.Game.Overlays
|
|||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
FadeIn(PopupDialog.ENTER_DURATION, EasingTypes.OutQuint);
|
this.FadeIn(PopupDialog.ENTER_DURATION, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
FadeOut(PopupDialog.EXIT_DURATION, EasingTypes.InSine);
|
this.FadeOut(PopupDialog.EXIT_DURATION, EasingTypes.InSine);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogOverlay()
|
public DialogOverlay()
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
FadeInFromZero(200, EasingTypes.Out);
|
this.FadeInFromZero(200, EasingTypes.Out);
|
||||||
bottomPanel.LayoutDuration = 200;
|
bottomPanel.LayoutDuration = 200;
|
||||||
bottomPanel.LayoutEasing = EasingTypes.Out;
|
bottomPanel.LayoutEasing = EasingTypes.Out;
|
||||||
bottomPanel.Origin = Anchor.BottomLeft;
|
bottomPanel.Origin = Anchor.BottomLeft;
|
||||||
|
@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
FadeInFromZero(200, EasingTypes.Out);
|
this.FadeInFromZero(200, EasingTypes.Out);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -75,7 +75,7 @@ namespace osu.Game.Overlays
|
|||||||
private void updatePosition(float position, bool easing = true)
|
private void updatePosition(float position, bool easing = true)
|
||||||
{
|
{
|
||||||
position = MathHelper.Clamp(position, 0, 1);
|
position = MathHelper.Clamp(position, 0, 1);
|
||||||
Fill.TransformTo(position, easing ? 200 : 0, EasingTypes.OutQuint, new TransformSeek());
|
Fill.TransformTo(position, easing ? 200 : 0, EasingTypes.OutQuint, new TransformSeek(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
@ -100,6 +100,10 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private class TransformSeek : TransformFloat<Drawable>
|
private class TransformSeek : TransformFloat<Drawable>
|
||||||
{
|
{
|
||||||
|
public TransformSeek(Drawable target) : base(target)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public override void Apply(Drawable d) => d.Width = CurrentValue;
|
public override void Apply(Drawable d) => d.Width = CurrentValue;
|
||||||
public override void ReadIntoStartValue(Drawable d) => StartValue = d.Width;
|
public override void ReadIntoStartValue(Drawable d) => StartValue = d.Width;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Overlays
|
|||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
settingsSection.Bounding = true;
|
settingsSection.Bounding = true;
|
||||||
FadeIn(transition_time, EasingTypes.OutQuint);
|
this.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
InputManager.ChangeFocus(settingsSection);
|
InputManager.ChangeFocus(settingsSection);
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ namespace osu.Game.Overlays
|
|||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
settingsSection.Bounding = false;
|
settingsSection.Bounding = false;
|
||||||
FadeOut(transition_time);
|
this.FadeOut(transition_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,16 +194,13 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
FadeIn(200);
|
this.FadeIn(200);
|
||||||
background.FlashColour(Color4.White.Opacity(0.25f), 400);
|
background.FlashColour(Color4.White.Opacity(0.25f), 400);
|
||||||
|
|
||||||
getSample.Play();
|
getSample.Play();
|
||||||
|
|
||||||
using (innerSpin.BeginLoopedSequence())
|
innerSpin.Spin(20000);
|
||||||
innerSpin.RotateTo(360, 20000);
|
outerSpin.Spin(40000);
|
||||||
|
|
||||||
using (outerSpin.BeginLoopedSequence())
|
|
||||||
outerSpin.RotateTo(360, 40000);
|
|
||||||
|
|
||||||
using (BeginDelayedSequence(200, true))
|
using (BeginDelayedSequence(200, true))
|
||||||
{
|
{
|
||||||
@ -233,7 +230,7 @@ namespace osu.Game.Overlays
|
|||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
FadeOut(200);
|
this.FadeOut(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dismiss()
|
private void dismiss()
|
||||||
@ -295,8 +292,8 @@ namespace osu.Game.Overlays
|
|||||||
Radius = 5,
|
Radius = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
MoveTo(positionForOffset(DISC_SIZE / 2 + 200), 500);
|
this.MoveTo(positionForOffset(DISC_SIZE / 2 + 200), 500);
|
||||||
FadeOut(500);
|
this.FadeOut(500);
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,16 +154,16 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
medalContainer.ScaleTo(1);
|
medalContainer.ScaleTo(1);
|
||||||
medalContainer.Show();
|
medalContainer.Show();
|
||||||
|
|
||||||
ScaleTo(scale_when_unlocked, duration, EasingTypes.OutExpo);
|
this.ScaleTo(scale_when_unlocked, duration, EasingTypes.OutExpo);
|
||||||
MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, EasingTypes.OutExpo);
|
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, EasingTypes.OutExpo);
|
||||||
unlocked.FadeInFromZero(duration);
|
unlocked.FadeInFromZero(duration);
|
||||||
break;
|
break;
|
||||||
case DisplayState.Full:
|
case DisplayState.Full:
|
||||||
medalContainer.ScaleTo(1);
|
medalContainer.ScaleTo(1);
|
||||||
medalContainer.Show();
|
medalContainer.Show();
|
||||||
|
|
||||||
ScaleTo(scale_when_full, duration, EasingTypes.OutExpo);
|
this.ScaleTo(scale_when_full, duration, EasingTypes.OutExpo);
|
||||||
MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, EasingTypes.OutExpo);
|
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, EasingTypes.OutExpo);
|
||||||
name.FadeInFromZero(duration + 100);
|
name.FadeInFromZero(duration + 100);
|
||||||
description.FadeInFromZero(duration * 2);
|
description.FadeInFromZero(duration * 2);
|
||||||
break;
|
break;
|
||||||
|
@ -144,7 +144,7 @@ namespace osu.Game.Overlays.Music
|
|||||||
|
|
||||||
matching = value;
|
matching = value;
|
||||||
|
|
||||||
FadeTo(matching ? 1 : 0, 200);
|
this.FadeTo(matching ? 1 : 0, 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,16 +105,16 @@ namespace osu.Game.Overlays.Music
|
|||||||
filter.Search.HoldFocus = true;
|
filter.Search.HoldFocus = true;
|
||||||
Schedule(() => inputManager.ChangeFocus(filter.Search));
|
Schedule(() => inputManager.ChangeFocus(filter.Search));
|
||||||
|
|
||||||
ResizeTo(new Vector2(1, playlist_height), transition_duration, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(1, playlist_height), transition_duration, EasingTypes.OutQuint);
|
||||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
filter.Search.HoldFocus = false;
|
filter.Search.HoldFocus = false;
|
||||||
|
|
||||||
ResizeTo(new Vector2(1, 0), transition_duration, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(1, 0), transition_duration, EasingTypes.OutQuint);
|
||||||
FadeOut(transition_duration);
|
this.FadeOut(transition_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void itemSelected(BeatmapSetInfo set)
|
private void itemSelected(BeatmapSetInfo set)
|
||||||
|
@ -370,7 +370,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
FadeIn(transition_length, EasingTypes.OutQuint);
|
this.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||||
dragContainer.ScaleTo(1, transition_length, EasingTypes.OutElastic);
|
dragContainer.ScaleTo(1, transition_length, EasingTypes.OutElastic);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
FadeOut(transition_length, EasingTypes.OutQuint);
|
this.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||||
dragContainer.ScaleTo(0.9f, transition_length, EasingTypes.OutQuint);
|
dragContainer.ScaleTo(0.9f, transition_length, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ namespace osu.Game.Overlays
|
|||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
this.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
FadeTo(1, TRANSITION_LENGTH / 2);
|
this.FadeTo(1, TRANSITION_LENGTH / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markAllRead()
|
private void markAllRead()
|
||||||
@ -105,8 +105,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
markAllRead();
|
markAllRead();
|
||||||
|
|
||||||
MoveToX(width, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
this.MoveToX(width, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
FadeTo(0, TRANSITION_LENGTH / 2);
|
this.FadeTo(0, TRANSITION_LENGTH / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -135,7 +135,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
FadeInFromZero(200);
|
this.FadeInFromZero(200);
|
||||||
NotificationContent.MoveToX(DrawSize.X);
|
NotificationContent.MoveToX(DrawSize.X);
|
||||||
NotificationContent.MoveToX(0, 500, EasingTypes.OutQuint);
|
NotificationContent.MoveToX(0, 500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
wasClosed = true;
|
wasClosed = true;
|
||||||
|
|
||||||
Closed?.Invoke();
|
Closed?.Invoke();
|
||||||
FadeOut(100);
|
this.FadeOut(100);
|
||||||
Expire();
|
Expire();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,13 +181,13 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
FadeColour(hoverColour, 200);
|
this.FadeColour(hoverColour, 200);
|
||||||
return base.OnHover(state);
|
return base.OnHover(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
FadeColour(OsuColour.Gray(0.2f), 200);
|
this.FadeColour(OsuColour.Gray(0.2f), 200);
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,12 +212,9 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
if (pulsate)
|
if (pulsate)
|
||||||
{
|
{
|
||||||
const float length = 1000;
|
const float length = 1000;
|
||||||
using (pulsateLayer.BeginLoopedSequence(length / 2))
|
pulsateLayer.Loop(length / 2,
|
||||||
{
|
p => p.FadeTo(0.4f, length, EasingTypes.In).Then().FadeTo(1, length, EasingTypes.Out)
|
||||||
pulsateLayer.FadeTo(0.4f, length, EasingTypes.In);
|
);
|
||||||
using (pulsateLayer.BeginDelayedSequence(length))
|
|
||||||
pulsateLayer.FadeTo(1, length, EasingTypes.Out);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
{
|
{
|
||||||
case ProgressNotificationState.Completed:
|
case ProgressNotificationState.Completed:
|
||||||
NotificationContent.MoveToY(-DrawSize.Y / 2, 200, EasingTypes.OutQuint);
|
NotificationContent.MoveToY(-DrawSize.Y / 2, 200, EasingTypes.OutQuint);
|
||||||
FadeTo(0.01f, 200); //don't completely fade out or our scheduled task won't run.
|
this.FadeTo(0.01f, 200); //don't completely fade out or our scheduled task won't run.
|
||||||
|
|
||||||
Delay(100);
|
Delay(100);
|
||||||
Schedule(Completed);
|
Schedule(Completed);
|
||||||
@ -196,7 +196,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
active = value;
|
active = value;
|
||||||
FadeColour(active ? colourActive : colourInactive, 100);
|
this.FadeColour(active ? colourActive : colourInactive, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
// probably needs a better transition.
|
// probably needs a better transition.
|
||||||
FadeTo(value ? 1 : 0);
|
this.FadeTo(value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
FadeTo(value ? 1 : 0);
|
this.FadeTo(value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
FadeTo(value ? 1 : 0);
|
this.FadeTo(value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,10 +94,10 @@ namespace osu.Game.Overlays.Settings
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, EasingTypes.OutQuint);
|
||||||
break;
|
break;
|
||||||
case ExpandedState.Expanded:
|
case ExpandedState.Expanded:
|
||||||
ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, EasingTypes.OutQuint);
|
this.ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, EasingTypes.OutQuint);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
sectionsContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
sectionsContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
FadeTo(1, TRANSITION_LENGTH / 2);
|
this.FadeTo(1, TRANSITION_LENGTH / 2);
|
||||||
|
|
||||||
searchTextBox.HoldFocus = true;
|
searchTextBox.HoldFocus = true;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
sectionsContainer.MoveToX(-width, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
sectionsContainer.MoveToX(-width, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
sidebar.MoveToX(-SIDEBAR_WIDTH, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
sidebar.MoveToX(-SIDEBAR_WIDTH, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
FadeTo(0, TRANSITION_LENGTH / 2);
|
this.FadeTo(0, TRANSITION_LENGTH / 2);
|
||||||
|
|
||||||
searchTextBox.HoldFocus = false;
|
searchTextBox.HoldFocus = false;
|
||||||
if (searchTextBox.HasFocus)
|
if (searchTextBox.HasFocus)
|
||||||
|
@ -121,16 +121,16 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
MoveToY(0, transition_time, EasingTypes.OutQuint);
|
this.MoveToY(0, transition_time, EasingTypes.OutQuint);
|
||||||
FadeIn(transition_time / 2, EasingTypes.OutQuint);
|
this.FadeIn(transition_time / 2, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
userArea?.LoginOverlay.Hide();
|
userArea?.LoginOverlay.Hide();
|
||||||
|
|
||||||
MoveToY(-DrawSize.Y, transition_time, EasingTypes.OutQuint);
|
this.MoveToY(-DrawSize.Y, transition_time, EasingTypes.OutQuint);
|
||||||
FadeOut(transition_time);
|
this.FadeOut(transition_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
public override bool HandleInput => !ruleset.Disabled;
|
public override bool HandleInput => !ruleset.Disabled;
|
||||||
|
|
||||||
private void disabledChanged(bool isDisabled) => FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);
|
private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
|
@ -137,23 +137,23 @@ namespace osu.Game.Overlays
|
|||||||
foreach (var w in wavesContainer.Children)
|
foreach (var w in wavesContainer.Children)
|
||||||
w.State = Visibility.Visible;
|
w.State = Visibility.Visible;
|
||||||
|
|
||||||
FadeIn(100, EasingTypes.OutQuint);
|
this.FadeIn(100, EasingTypes.OutQuint);
|
||||||
contentContainer.MoveToY(0, APPEAR_DURATION, EasingTypes.OutQuint);
|
contentContainer.MoveToY(0, APPEAR_DURATION, EasingTypes.OutQuint);
|
||||||
|
|
||||||
FadeIn(100, EasingTypes.OutQuint);
|
this.FadeIn(100, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
FadeOut(DISAPPEAR_DURATION, EasingTypes.InQuint);
|
this.FadeOut(DISAPPEAR_DURATION, EasingTypes.InQuint);
|
||||||
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, EasingTypes.In);
|
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, EasingTypes.In);
|
||||||
|
|
||||||
foreach (var w in wavesContainer.Children)
|
foreach (var w in wavesContainer.Children)
|
||||||
w.State = Visibility.Hidden;
|
w.State = Visibility.Hidden;
|
||||||
|
|
||||||
FadeOut(DISAPPEAR_DURATION, EasingTypes.InQuint);
|
this.FadeOut(DISAPPEAR_DURATION, EasingTypes.InQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
@ -210,10 +210,10 @@ namespace osu.Game.Overlays
|
|||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
case Visibility.Hidden:
|
case Visibility.Hidden:
|
||||||
MoveToY(Parent.Parent.DrawSize.Y, DISAPPEAR_DURATION, easing_hide);
|
this.MoveToY(Parent.Parent.DrawSize.Y, DISAPPEAR_DURATION, easing_hide);
|
||||||
break;
|
break;
|
||||||
case Visibility.Visible:
|
case Visibility.Visible:
|
||||||
MoveToY(FinalPosition, APPEAR_DURATION, easing_show);
|
this.MoveToY(FinalPosition, APPEAR_DURATION, easing_show);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,26 +64,26 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
FadeInFromZero(100, EasingTypes.OutQuint);
|
this.FadeInFromZero(100, EasingTypes.OutQuint);
|
||||||
|
|
||||||
switch (Judgement.Result)
|
switch (Judgement.Result)
|
||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
ScaleTo(1.6f);
|
this.ScaleTo(1.6f);
|
||||||
ScaleTo(1, 100, EasingTypes.In);
|
this.ScaleTo(1, 100, EasingTypes.In);
|
||||||
|
|
||||||
MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint);
|
this.MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint);
|
||||||
RotateTo(40, 800, EasingTypes.InQuint);
|
this.RotateTo(40, 800, EasingTypes.InQuint);
|
||||||
|
|
||||||
Delay(600);
|
Delay(600);
|
||||||
FadeOut(200);
|
this.FadeOut(200);
|
||||||
break;
|
break;
|
||||||
case HitResult.Hit:
|
case HitResult.Hit:
|
||||||
ScaleTo(0.9f);
|
this.ScaleTo(0.9f);
|
||||||
ScaleTo(1, 500, EasingTypes.OutElastic);
|
this.ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||||
|
|
||||||
Delay(100);
|
Delay(100);
|
||||||
FadeOut(400);
|
this.FadeOut(400);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ using OpenTK.Graphics;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit
|
namespace osu.Game.Screens.Edit
|
||||||
{
|
{
|
||||||
|
@ -248,23 +248,23 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
box.ScaleTo(new Vector2(0, 1), 500, EasingTypes.OutExpo);
|
box.ScaleTo(new Vector2(0, 1), 500, EasingTypes.OutExpo);
|
||||||
FadeOut(500);
|
this.FadeOut(500);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
box.ScaleTo(new Vector2(0, 1), 400, EasingTypes.InSine);
|
box.ScaleTo(new Vector2(0, 1), 400, EasingTypes.InSine);
|
||||||
FadeOut(800);
|
this.FadeOut(800);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ButtonState.Expanded:
|
case ButtonState.Expanded:
|
||||||
const int expand_duration = 500;
|
const int expand_duration = 500;
|
||||||
box.ScaleTo(new Vector2(1, 1), expand_duration, EasingTypes.OutExpo);
|
box.ScaleTo(new Vector2(1, 1), expand_duration, EasingTypes.OutExpo);
|
||||||
FadeIn(expand_duration / 6f);
|
this.FadeIn(expand_duration / 6f);
|
||||||
break;
|
break;
|
||||||
case ButtonState.Exploded:
|
case ButtonState.Exploded:
|
||||||
const int explode_duration = 200;
|
const int explode_duration = 200;
|
||||||
box.ScaleTo(new Vector2(2, 1), explode_duration, EasingTypes.OutExpo);
|
box.ScaleTo(new Vector2(2, 1), explode_duration, EasingTypes.OutExpo);
|
||||||
FadeOut(explode_duration / 4f * 3);
|
this.FadeOut(explode_duration / 4f * 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ using osu.Game.Screens.Backgrounds;
|
|||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multiplayer
|
namespace osu.Game.Screens.Multiplayer
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.HUD
|
namespace osu.Game.Screens.Play.HUD
|
||||||
@ -130,7 +129,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
protected virtual void OnCountRolling(int currentValue, int newValue)
|
protected virtual void OnCountRolling(int currentValue, int newValue)
|
||||||
{
|
{
|
||||||
transformRoll(new TransformComboRoll(), currentValue, newValue);
|
transformRoll(new TransformComboRoll(this), currentValue, newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnCountIncrement(int currentValue, int newValue)
|
protected virtual void OnCountIncrement(int currentValue, int newValue)
|
||||||
@ -188,25 +187,17 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
private void transformRoll(TransformComboRoll transform, int currentValue, int newValue)
|
private void transformRoll(TransformComboRoll transform, int currentValue, int newValue)
|
||||||
{
|
{
|
||||||
TransformTo(newValue, getProportionalDuration(currentValue, newValue), RollingEasing, new TransformComboRoll());
|
this.TransformTo(newValue, getProportionalDuration(currentValue, newValue), RollingEasing, new TransformComboRoll(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class TransformComboRoll : Transform<int, Drawable>
|
protected class TransformComboRoll : TransformInt<ComboCounter>
|
||||||
{
|
{
|
||||||
public virtual int CurrentValue
|
public TransformComboRoll(ComboCounter target) : base(target)
|
||||||
{
|
{
|
||||||
get
|
|
||||||
{
|
|
||||||
double time = Time?.Current ?? 0;
|
|
||||||
if (time < StartTime) return StartValue;
|
|
||||||
if (time >= EndTime) return EndValue;
|
|
||||||
|
|
||||||
return (int)Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Apply(Drawable d) => ((ComboCounter)d).DisplayedCount = CurrentValue;
|
public override void Apply(ComboCounter d) => d.DisplayedCount = CurrentValue;
|
||||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((ComboCounter)d).DisplayedCount;
|
public override void ReadIntoStartValue(ComboCounter d) => StartValue = d.DisplayedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void OnDisplayedCountRolling(int currentValue, int newValue);
|
protected abstract void OnDisplayedCountRolling(int currentValue, int newValue);
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Transforms;
|
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.HUD
|
namespace osu.Game.Screens.Play.HUD
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.HUD
|
namespace osu.Game.Screens.Play.HUD
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
showKeyCounter = config.GetBindable<bool>(OsuSetting.KeyOverlay);
|
showKeyCounter = config.GetBindable<bool>(OsuSetting.KeyOverlay);
|
||||||
showKeyCounter.ValueChanged += keyCounterVisibility => FadeTo(keyCounterVisibility ? 1 : 0, duration);
|
showKeyCounter.ValueChanged += keyCounterVisibility => this.FadeTo(keyCounterVisibility ? 1 : 0, duration);
|
||||||
showKeyCounter.TriggerChange();
|
showKeyCounter.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public override bool HandleInput => State == Visibility.Visible;
|
public override bool HandleInput => State == Visibility.Visible;
|
||||||
|
|
||||||
protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In);
|
protected override void PopIn() => this.FadeIn(transition_duration, EasingTypes.In);
|
||||||
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In);
|
protected override void PopOut() => this.FadeOut(transition_duration, EasingTypes.In);
|
||||||
|
|
||||||
// Don't let mouse down events through the overlay or people can click circles while paused.
|
// Don't let mouse down events through the overlay or people can click circles while paused.
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
@ -143,7 +143,7 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
{
|
{
|
||||||
Content.ScaleTo(0.7f, 150, EasingTypes.InQuint);
|
Content.ScaleTo(0.7f, 150, EasingTypes.InQuint);
|
||||||
FadeOut(150);
|
this.FadeOut(150);
|
||||||
|
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
@ -100,9 +100,9 @@ namespace osu.Game.Screens.Play
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FadeInFromZero(fade_time);
|
this.FadeInFromZero(fade_time);
|
||||||
using (BeginAbsoluteSequence(beginFadeTime))
|
using (BeginAbsoluteSequence(beginFadeTime))
|
||||||
FadeOut(fade_time);
|
this.FadeOut(fade_time);
|
||||||
|
|
||||||
button.Action = () => AudioClock?.Seek(startTime - skip_required_cutoff - fade_time);
|
button.Action = () => AudioClock?.Seek(startTime - skip_required_cutoff - fade_time);
|
||||||
|
|
||||||
@ -154,14 +154,14 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
case Visibility.Visible:
|
case Visibility.Visible:
|
||||||
if (lastState == Visibility.Hidden)
|
if (lastState == Visibility.Hidden)
|
||||||
FadeIn(500, EasingTypes.OutExpo);
|
this.FadeIn(500, EasingTypes.OutExpo);
|
||||||
|
|
||||||
if (!IsHovered)
|
if (!IsHovered)
|
||||||
using (BeginDelayedSequence(1000))
|
using (BeginDelayedSequence(1000))
|
||||||
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
||||||
break;
|
break;
|
||||||
case Visibility.Hidden:
|
case Visibility.Hidden:
|
||||||
FadeOut(1000, EasingTypes.OutExpo);
|
this.FadeOut(1000, EasingTypes.OutExpo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,18 +123,18 @@ namespace osu.Game.Screens.Play
|
|||||||
private void updateBarVisibility()
|
private void updateBarVisibility()
|
||||||
{
|
{
|
||||||
bar.FadeTo(allowSeeking ? 1 : 0, transition_duration, EasingTypes.In);
|
bar.FadeTo(allowSeeking ? 1 : 0, transition_duration, EasingTypes.In);
|
||||||
MoveTo(new Vector2(0, allowSeeking ? 0 : bottom_bar_height), transition_duration, EasingTypes.In);
|
this.MoveTo(new Vector2(0, allowSeeking ? 0 : bottom_bar_height), transition_duration, EasingTypes.In);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
updateBarVisibility();
|
updateBarVisibility();
|
||||||
FadeIn(500, EasingTypes.OutQuint);
|
this.FadeIn(500, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
FadeOut(100);
|
this.FadeOut(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
@ -51,14 +51,14 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
MoveToX(0, 800, EasingTypes.OutQuint);
|
this.MoveToX(0, 800, EasingTypes.OutQuint);
|
||||||
RotateTo(0, 800, EasingTypes.OutQuint);
|
this.RotateTo(0, 800, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
MoveToX(-100, 800, EasingTypes.InQuint);
|
this.MoveToX(-100, 800, EasingTypes.InQuint);
|
||||||
RotateTo(10, 800, EasingTypes.InQuint);
|
this.RotateTo(10, 800, EasingTypes.InQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateBeatmap(WorkingBeatmap beatmap)
|
public void UpdateBeatmap(WorkingBeatmap beatmap)
|
||||||
@ -84,7 +84,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Shear = -Shear,
|
Shear = -Shear,
|
||||||
OnLoadComplete = d =>
|
OnLoadComplete = d =>
|
||||||
{
|
{
|
||||||
FadeIn(250);
|
this.FadeIn(250);
|
||||||
|
|
||||||
lastContainer?.FadeOut(250);
|
lastContainer?.FadeOut(250);
|
||||||
lastContainer?.Expire();
|
lastContainer?.Expire();
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
nameLabel.MoveToX(150);
|
nameLabel.MoveToX(150);
|
||||||
break;
|
break;
|
||||||
case Visibility.Visible:
|
case Visibility.Visible:
|
||||||
FadeIn(200);
|
this.FadeIn(200);
|
||||||
content.MoveToY(0, 800, EasingTypes.OutQuint);
|
content.MoveToY(0, 800, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Delay(100, true);
|
Delay(100, true);
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||||
|
|
||||||
if (buttonsContainer.Position.X == 1 || Alpha == 0)
|
if (buttonsContainer.Position.X == 1 || Alpha == 0)
|
||||||
buttonsContainer.MoveToX(x_position - x_movement);
|
buttonsContainer.MoveToX(x_position - x_movement);
|
||||||
@ -49,7 +49,7 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
buttonsContainer.MoveToX(x_position + x_movement, transition_duration, EasingTypes.InSine);
|
buttonsContainer.MoveToX(x_position + x_movement, transition_duration, EasingTypes.InSine);
|
||||||
buttonsContainer.TransformSpacingTo(new Vector2(200f, 0f), transition_duration, EasingTypes.InSine);
|
buttonsContainer.TransformSpacingTo(new Vector2(200f, 0f), transition_duration, EasingTypes.InSine);
|
||||||
|
|
||||||
FadeOut(transition_duration, EasingTypes.InQuint);
|
this.FadeOut(transition_duration, EasingTypes.InQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BeatmapOptionsOverlay()
|
public BeatmapOptionsOverlay()
|
||||||
|
@ -297,7 +297,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None) => TransformTo(value, duration, easing, new TransformScrollSpeed());
|
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None) => this.TransformTo(value, duration, easing, new TransformScrollSpeed(this));
|
||||||
|
|
||||||
private enum ScrollState
|
private enum ScrollState
|
||||||
{
|
{
|
||||||
@ -308,10 +308,14 @@ namespace osu.Game.Screens.Tournament
|
|||||||
Scrolling
|
Scrolling
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TransformScrollSpeed : TransformFloat<Drawable>
|
public class TransformScrollSpeed : TransformFloat<ScrollingTeamContainer>
|
||||||
{
|
{
|
||||||
public override void Apply(Drawable d) => ((ScrollingTeamContainer)d).speed = CurrentValue;
|
public TransformScrollSpeed(ScrollingTeamContainer target) : base(target)
|
||||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((ScrollingTeamContainer)d).speed;
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Apply(ScrollingTeamContainer d) => d.speed = CurrentValue;
|
||||||
|
public override void ReadIntoStartValue(ScrollingTeamContainer d) => StartValue = d.speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ScrollingTeam : Container
|
public class ScrollingTeam : Container
|
||||||
|
@ -183,13 +183,13 @@ namespace osu.Game.Users
|
|||||||
{
|
{
|
||||||
statusBar.ResizeHeightTo(0f, transition_duration, EasingTypes.OutQuint);
|
statusBar.ResizeHeightTo(0f, transition_duration, EasingTypes.OutQuint);
|
||||||
statusBar.FadeOut(transition_duration, EasingTypes.OutQuint);
|
statusBar.FadeOut(transition_duration, EasingTypes.OutQuint);
|
||||||
ResizeHeightTo(height - status_height, transition_duration, EasingTypes.OutQuint);
|
this.ResizeHeightTo(height - status_height, transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
statusBar.ResizeHeightTo(status_height, transition_duration, EasingTypes.OutQuint);
|
statusBar.ResizeHeightTo(status_height, transition_duration, EasingTypes.OutQuint);
|
||||||
statusBar.FadeIn(transition_duration, EasingTypes.OutQuint);
|
statusBar.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||||
ResizeHeightTo(height, transition_duration, EasingTypes.OutQuint);
|
this.ResizeHeightTo(height, transition_duration, EasingTypes.OutQuint);
|
||||||
|
|
||||||
statusBg.FadeColour(status.GetAppropriateColour(colours), 500, EasingTypes.OutQuint);
|
statusBg.FadeColour(status.GetAppropriateColour(colours), 500, EasingTypes.OutQuint);
|
||||||
statusMessage.Text = status.Message;
|
statusMessage.Text = status.Message;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user