mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Use Colour instead of ColourInfo
This commit is contained in:
@ -42,7 +42,7 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
if (!parallaxEnabled)
|
||||
{
|
||||
content.MoveTo(Vector2.Zero, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
||||
content.MoveTo(Vector2.Zero, firstUpdate ? 0 : 1000, Easing.OutQuint);
|
||||
content.Scale = new Vector2(1 + ParallaxAmount);
|
||||
}
|
||||
};
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.Containers
|
||||
if (parallaxEnabled)
|
||||
{
|
||||
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
|
||||
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
||||
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, Easing.OutQuint);
|
||||
content.Scale = new Vector2(1 + ParallaxAmount);
|
||||
}
|
||||
|
||||
|
@ -29,14 +29,14 @@ namespace osu.Game.Graphics.Cursor
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
ActiveCursor.Scale = new Vector2(1);
|
||||
ActiveCursor.ScaleTo(1.2f, 100, EasingTypes.OutQuad);
|
||||
ActiveCursor.ScaleTo(1.2f, 100, Easing.OutQuad);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
if (!state.Mouse.HasMainButtonPressed)
|
||||
ActiveCursor.ScaleTo(1, 200, EasingTypes.OutQuad);
|
||||
ActiveCursor.ScaleTo(1, 200, Easing.OutQuad);
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
if (diff > 180) diff -= 360;
|
||||
degrees = ActiveCursor.Rotation + diff;
|
||||
|
||||
ActiveCursor.RotateTo(degrees, 600, EasingTypes.OutQuint);
|
||||
ActiveCursor.RotateTo(degrees, 600, Easing.OutQuint);
|
||||
}
|
||||
|
||||
return base.OnMouseMove(state);
|
||||
@ -49,10 +49,10 @@ namespace osu.Game.Graphics.Cursor
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
ActiveCursor.Scale = new Vector2(1);
|
||||
ActiveCursor.ScaleTo(0.90f, 800, EasingTypes.OutQuint);
|
||||
ActiveCursor.ScaleTo(0.90f, 800, Easing.OutQuint);
|
||||
|
||||
((Cursor)ActiveCursor).AdditiveLayer.Alpha = 0;
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, EasingTypes.OutQuint);
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
dragging = false;
|
||||
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, EasingTypes.OutQuint);
|
||||
ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), EasingTypes.OutElasticHalf);
|
||||
ActiveCursor.ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, Easing.OutQuint);
|
||||
ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), Easing.OutElasticHalf);
|
||||
ActiveCursor.ScaleTo(1, 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
return base.OnMouseUp(state, args);
|
||||
@ -72,21 +72,21 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOutFromOne(500, EasingTypes.OutQuint);
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint);
|
||||
|
||||
return base.OnClick(state);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
ActiveCursor.FadeTo(1, 250, EasingTypes.OutQuint);
|
||||
ActiveCursor.ScaleTo(1, 400, EasingTypes.OutQuint);
|
||||
ActiveCursor.FadeTo(1, 250, Easing.OutQuint);
|
||||
ActiveCursor.ScaleTo(1, 400, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
ActiveCursor.FadeTo(0, 900, EasingTypes.OutQuint);
|
||||
ActiveCursor.ScaleTo(0, 500, EasingTypes.In);
|
||||
ActiveCursor.FadeTo(0, 900, Easing.OutQuint);
|
||||
ActiveCursor.ScaleTo(0, 500, Easing.In);
|
||||
}
|
||||
|
||||
public class Cursor : Container
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
if (IsPresent)
|
||||
{
|
||||
AutoSizeDuration = 250;
|
||||
background.FlashColour(OsuColour.Gray(0.4f), 1000, EasingTypes.OutQuint);
|
||||
background.FlashColour(OsuColour.Gray(0.4f), 1000, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
AutoSizeDuration = 0;
|
||||
@ -48,7 +48,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
public OsuTooltip()
|
||||
{
|
||||
AutoSizeEasing = EasingTypes.OutQuint;
|
||||
AutoSizeEasing = Easing.OutQuint;
|
||||
|
||||
CornerRadius = 5;
|
||||
Masking = true;
|
||||
@ -83,10 +83,10 @@ namespace osu.Game.Graphics.Cursor
|
||||
protected override void PopIn()
|
||||
{
|
||||
instantMovement |= !IsPresent;
|
||||
this.FadeIn(500, EasingTypes.OutQuint);
|
||||
this.FadeIn(500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut() => this.Delay(150).FadeOut(500, EasingTypes.OutQuint);
|
||||
protected override void PopOut() => this.Delay(150).FadeOut(500, Easing.OutQuint);
|
||||
|
||||
public override void Move(Vector2 pos)
|
||||
{
|
||||
@ -97,7 +97,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
}
|
||||
else
|
||||
{
|
||||
this.MoveTo(pos, 200, EasingTypes.OutQuint);
|
||||
this.MoveTo(pos, 200, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Graphics
|
||||
/// <param name="newColour">The new accent colour.</param>
|
||||
/// <param name="duration">The tween duration.</param>
|
||||
/// <param name="easing">The tween easing.</param>
|
||||
public static TransformSequence<T> FadeAccent<T>(this T accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
|
||||
public static TransformSequence<T> FadeAccent<T>(this T accentedDrawable, Color4 newColour, double duration = 0, Easing easing = Easing.None)
|
||||
where T : IHasAccentColour
|
||||
=> accentedDrawable.TransformTo(nameof(accentedDrawable.AccentColour), newColour, duration, easing);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private const int resize_duration = 250;
|
||||
|
||||
private const EasingTypes easing = EasingTypes.InOutCubic;
|
||||
private const Easing easing = Easing.InOutCubic;
|
||||
|
||||
private float length;
|
||||
/// <summary>
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
var tabIndex = TabContainer.IndexOf(TabMap[tab]);
|
||||
|
||||
t.State = tIndex < tabIndex ? Visibility.Hidden : Visibility.Visible;
|
||||
t.Chevron.FadeTo(tIndex <= tabIndex ? 0f : 1f, 500, EasingTypes.OutQuint);
|
||||
t.Chevron.FadeTo(tIndex <= tabIndex ? 0f : 1f, 500, Easing.OutQuint);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -54,13 +54,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (State == Visibility.Visible)
|
||||
{
|
||||
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
this.ScaleTo(new Vector2(1f), transition_duration, EasingTypes.OutQuint);
|
||||
this.FadeIn(transition_duration, Easing.OutQuint);
|
||||
this.ScaleTo(new Vector2(1f), transition_duration, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.FadeOut(transition_duration, EasingTypes.OutQuint);
|
||||
this.ScaleTo(new Vector2(0.8f, 1f), transition_duration, EasingTypes.OutQuint);
|
||||
this.FadeOut(transition_duration, Easing.OutQuint);
|
||||
this.ScaleTo(new Vector2(0.8f, 1f), transition_duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected override bool OnClick(Framework.Input.InputState state)
|
||||
{
|
||||
didClick = true;
|
||||
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, EasingTypes.In);
|
||||
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, Easing.In);
|
||||
flash();
|
||||
|
||||
this.Delay(click_duration).Schedule(delegate {
|
||||
@ -110,10 +110,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnHover(Framework.Input.InputState state)
|
||||
{
|
||||
spriteText.TransformSpacingTo(hoverSpacing, hover_duration, EasingTypes.OutElastic);
|
||||
spriteText.TransformSpacingTo(hoverSpacing, hover_duration, Easing.OutElastic);
|
||||
|
||||
colourContainer.ResizeTo(new Vector2(hover_width, 1f), hover_duration, EasingTypes.OutElastic);
|
||||
glowContainer.FadeIn(glow_fade_duration, EasingTypes.Out);
|
||||
colourContainer.ResizeTo(new Vector2(hover_width, 1f), hover_duration, Easing.OutElastic);
|
||||
glowContainer.FadeIn(glow_fade_duration, Easing.Out);
|
||||
base.OnHover(state);
|
||||
return true;
|
||||
}
|
||||
@ -122,9 +122,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
if (!didClick)
|
||||
{
|
||||
colourContainer.ResizeTo(new Vector2(0.8f, 1f), hover_duration, EasingTypes.OutElastic);
|
||||
spriteText.TransformSpacingTo(Vector2.Zero, hover_duration, EasingTypes.OutElastic);
|
||||
glowContainer.FadeOut(glow_fade_duration, EasingTypes.Out);
|
||||
colourContainer.ResizeTo(new Vector2(0.8f, 1f), hover_duration, Easing.OutElastic);
|
||||
spriteText.TransformSpacingTo(Vector2.Zero, hover_duration, Easing.OutElastic);
|
||||
glowContainer.FadeOut(glow_fade_duration, Easing.Out);
|
||||
}
|
||||
|
||||
didClick = false;
|
||||
@ -148,9 +148,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private void updateGlow()
|
||||
{
|
||||
leftGlow.ColourInfo = ColourInfo.GradientHorizontal(new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f), ButtonColour);
|
||||
leftGlow.Colour = ColourInfo.GradientHorizontal(new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f), ButtonColour);
|
||||
centerGlow.Colour = ButtonColour;
|
||||
rightGlow.ColourInfo = ColourInfo.GradientHorizontal(ButtonColour, new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f));
|
||||
rightGlow.Colour = ColourInfo.GradientHorizontal(ButtonColour, new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f));
|
||||
}
|
||||
|
||||
public DialogButton()
|
||||
|
@ -84,31 +84,31 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
hover.FadeIn(500, EasingTypes.OutQuint);
|
||||
hover.FadeIn(500, Easing.OutQuint);
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
hover.FadeOut(500, EasingTypes.OutQuint);
|
||||
hover.FadeOut(500, Easing.OutQuint);
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
hover.FlashColour(flashColour, 800, EasingTypes.OutQuint);
|
||||
hover.FlashColour(flashColour, 800, Easing.OutQuint);
|
||||
return base.OnClick(state);
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
content.ScaleTo(0.75f, 2000, EasingTypes.OutQuint);
|
||||
content.ScaleTo(0.75f, 2000, Easing.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
content.ScaleTo(1, 1000, EasingTypes.OutElastic);
|
||||
content.ScaleTo(1, 1000, Easing.OutElastic);
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
values = value.ToArray();
|
||||
applyPath();
|
||||
maskingContainer.Width = 0;
|
||||
maskingContainer.ResizeWidthTo(1, transform_duration, EasingTypes.OutQuint);
|
||||
maskingContainer.ResizeWidthTo(1, transform_duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private const float transition_duration = 500;
|
||||
|
||||
protected override void PopIn() => this.FadeIn(transition_duration * 5, EasingTypes.OutQuint);
|
||||
protected override void PopIn() => this.FadeIn(transition_duration * 5, Easing.OutQuint);
|
||||
|
||||
protected override void PopOut() => this.FadeOut(transition_duration, EasingTypes.OutQuint);
|
||||
protected override void PopOut() => this.FadeOut(transition_duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Current.ValueChanged += newValue =>
|
||||
{
|
||||
if (newValue)
|
||||
fill.FadeIn(200, EasingTypes.OutQuint);
|
||||
fill.FadeIn(200, Easing.OutQuint);
|
||||
else
|
||||
fill.FadeTo(0.01f, 200, EasingTypes.OutQuint); //todo: remove once we figure why containers aren't drawing at all times
|
||||
fill.FadeTo(0.01f, 200, Easing.OutQuint); //todo: remove once we figure why containers aren't drawing at all times
|
||||
};
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (value)
|
||||
{
|
||||
this.FadeColour(GlowingAccentColour, 500, EasingTypes.OutQuint);
|
||||
FadeEdgeEffectTo(1, 500, EasingTypes.OutQuint);
|
||||
this.FadeColour(GlowingAccentColour, 500, Easing.OutQuint);
|
||||
FadeEdgeEffectTo(1, 500, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -95,7 +95,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
set
|
||||
{
|
||||
this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, EasingTypes.OutQuint);
|
||||
this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,13 +91,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
Content.ScaleTo(0.9f, 4000, EasingTypes.OutQuint);
|
||||
Content.ScaleTo(0.9f, 4000, Easing.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
Content.ScaleTo(1, 1000, EasingTypes.OutElastic);
|
||||
Content.ScaleTo(1, 1000, Easing.OutElastic);
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
}
|
||||
|
@ -39,13 +39,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Background.Colour = colours.ContextMenuGray;
|
||||
}
|
||||
|
||||
protected override void AnimateOpen() => this.FadeIn(fade_duration, EasingTypes.OutQuint);
|
||||
protected override void AnimateClose() => this.FadeOut(fade_duration, EasingTypes.OutQuint);
|
||||
protected override void AnimateOpen() => this.FadeIn(fade_duration, Easing.OutQuint);
|
||||
protected override void AnimateClose() => this.FadeOut(fade_duration, Easing.OutQuint);
|
||||
|
||||
protected override void UpdateContentHeight()
|
||||
{
|
||||
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
||||
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
||||
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,15 +93,15 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
sampleHover.Play();
|
||||
textBold.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||
textBold.FadeIn(transition_length, Easing.OutQuint);
|
||||
text.FadeOut(transition_length, Easing.OutQuint);
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
textBold.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||
textBold.FadeOut(transition_length, Easing.OutQuint);
|
||||
text.FadeIn(transition_length, Easing.OutQuint);
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
|
@ -19,14 +19,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
ItemsContainer.Padding = new MarginPadding(5);
|
||||
}
|
||||
|
||||
protected override void AnimateOpen() => this.FadeIn(300, EasingTypes.OutQuint);
|
||||
protected override void AnimateOpen() => this.FadeIn(300, Easing.OutQuint);
|
||||
|
||||
protected override void AnimateClose() => this.FadeOut(300, EasingTypes.OutQuint);
|
||||
protected override void AnimateClose() => this.FadeOut(300, Easing.OutQuint);
|
||||
|
||||
protected override void UpdateContentHeight()
|
||||
{
|
||||
var actualHeight = (RelativeSizeAxes & Axes.Y) > 0 ? 1 : ContentHeight;
|
||||
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, EasingTypes.OutQuint);
|
||||
this.ResizeTo(new Vector2(1, State == MenuState.Opened ? actualHeight : 0), 300, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
circle.FadeIn(500, EasingTypes.OutQuint);
|
||||
circle.ResizeTo(new Vector2(0.8f), 500, EasingTypes.OutQuint);
|
||||
circle.FadeIn(500, Easing.OutQuint);
|
||||
circle.ResizeTo(new Vector2(0.8f), 500, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override void UpdateValue(float value)
|
||||
{
|
||||
Nub.MoveToX(RangePadding + UsableWidth * value, 250, EasingTypes.OutQuint);
|
||||
Nub.MoveToX(RangePadding + UsableWidth * value, 250, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,14 +77,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private void fadeActive()
|
||||
{
|
||||
box.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||
Text.FadeColour(Color4.White, transition_length, EasingTypes.OutQuint);
|
||||
box.FadeIn(transition_length, Easing.OutQuint);
|
||||
Text.FadeColour(Color4.White, transition_length, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void fadeInactive()
|
||||
{
|
||||
box.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||
Text.FadeColour(AccentColour, transition_length, EasingTypes.OutQuint);
|
||||
box.FadeOut(transition_length, Easing.OutQuint);
|
||||
Text.FadeColour(AccentColour, transition_length, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
|
@ -49,14 +49,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private void fadeIn()
|
||||
{
|
||||
box.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeColour(Color4.White, transition_length, EasingTypes.OutQuint);
|
||||
box.FadeIn(transition_length, Easing.OutQuint);
|
||||
text.FadeColour(Color4.White, transition_length, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void fadeOut()
|
||||
{
|
||||
box.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeColour(AccentColour, transition_length, EasingTypes.OutQuint);
|
||||
box.FadeOut(transition_length, Easing.OutQuint);
|
||||
text.FadeColour(AccentColour, transition_length, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// <summary>
|
||||
/// Easing for the counter rollover animation.
|
||||
/// </summary>
|
||||
protected virtual EasingTypes RollingEasing => EasingTypes.OutQuint;
|
||||
protected virtual Easing RollingEasing => Easing.OutQuint;
|
||||
|
||||
private T displayedCount;
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public class ScoreCounter : RollingCounter<double>
|
||||
{
|
||||
protected override double RollingDuration => 1000;
|
||||
protected override EasingTypes RollingEasing => EasingTypes.Out;
|
||||
protected override Easing RollingEasing => Easing.Out;
|
||||
|
||||
public bool UseCommaSeparator;
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private double animationDelay => 80;
|
||||
|
||||
private double scalingDuration => 1000;
|
||||
private EasingTypes scalingEasing => EasingTypes.OutElasticHalf;
|
||||
private Easing scalingEasing => Easing.OutElasticHalf;
|
||||
private float minStarScale => 0.4f;
|
||||
|
||||
private double fadingDuration => 100;
|
||||
|
@ -173,20 +173,20 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
this.ResizeTo(SIZE_EXTENDED, transform_time, EasingTypes.OutElastic);
|
||||
IconLayer.FadeColour(HoverColour, transform_time, EasingTypes.OutElastic);
|
||||
this.ResizeTo(SIZE_EXTENDED, transform_time, Easing.OutElastic);
|
||||
IconLayer.FadeColour(HoverColour, transform_time, Easing.OutElastic);
|
||||
|
||||
bouncingIcon.ScaleTo(1.1f, transform_time, EasingTypes.OutElastic);
|
||||
bouncingIcon.ScaleTo(1.1f, transform_time, Easing.OutElastic);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
this.ResizeTo(SIZE_RETRACTED, transform_time, EasingTypes.OutElastic);
|
||||
IconLayer.FadeColour(TextLayer.Colour, transform_time, EasingTypes.OutElastic);
|
||||
this.ResizeTo(SIZE_RETRACTED, transform_time, Easing.OutElastic);
|
||||
IconLayer.FadeColour(TextLayer.Colour, transform_time, Easing.OutElastic);
|
||||
|
||||
bouncingIcon.ScaleTo(1, transform_time, EasingTypes.OutElastic);
|
||||
bouncingIcon.ScaleTo(1, transform_time, Easing.OutElastic);
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
@ -205,7 +205,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Add(flash);
|
||||
|
||||
flash.Alpha = 1;
|
||||
flash.FadeOut(500, EasingTypes.OutQuint);
|
||||
flash.FadeOut(500, Easing.OutQuint);
|
||||
flash.Expire();
|
||||
|
||||
return base.OnClick(state);
|
||||
@ -245,9 +245,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (beatIndex < 0) return;
|
||||
|
||||
icon.ScaleTo(1 - 0.1f * amplitudeAdjust, beat_in_time, EasingTypes.Out)
|
||||
icon.ScaleTo(1 - 0.1f * amplitudeAdjust, beat_in_time, Easing.Out)
|
||||
.Then()
|
||||
.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||
.ScaleTo(1, beatLength * 2, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +82,6 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateFill() => meterFill.ScaleTo(new Vector2(1, (float)Volume), 300, EasingTypes.OutQuint);
|
||||
private void updateFill() => meterFill.ScaleTo(new Vector2(1, (float)Volume), 300, Easing.OutQuint);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user