mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +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:
@ -7,6 +7,7 @@ using OpenTK.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
|
@ -248,23 +248,23 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
default:
|
||||
box.ScaleTo(new Vector2(0, 1), 500, EasingTypes.OutExpo);
|
||||
FadeOut(500);
|
||||
this.FadeOut(500);
|
||||
break;
|
||||
case 1:
|
||||
box.ScaleTo(new Vector2(0, 1), 400, EasingTypes.InSine);
|
||||
FadeOut(800);
|
||||
this.FadeOut(800);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ButtonState.Expanded:
|
||||
const int expand_duration = 500;
|
||||
box.ScaleTo(new Vector2(1, 1), expand_duration, EasingTypes.OutExpo);
|
||||
FadeIn(expand_duration / 6f);
|
||||
this.FadeIn(expand_duration / 6f);
|
||||
break;
|
||||
case ButtonState.Exploded:
|
||||
const int explode_duration = 200;
|
||||
box.ScaleTo(new Vector2(2, 1), explode_duration, EasingTypes.OutExpo);
|
||||
FadeOut(explode_duration / 4f * 3);
|
||||
this.FadeOut(explode_duration / 4f * 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Play;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multiplayer
|
||||
{
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
@ -130,7 +129,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
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)
|
||||
@ -188,25 +187,17 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
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 ReadIntoStartValue(Drawable d) => StartValue = ((ComboCounter)d).DisplayedCount;
|
||||
public override void Apply(ComboCounter d) => d.DisplayedCount = CurrentValue;
|
||||
public override void ReadIntoStartValue(ComboCounter d) => StartValue = d.DisplayedCount;
|
||||
}
|
||||
|
||||
protected abstract void OnDisplayedCountRolling(int currentValue, int newValue);
|
||||
|
@ -1,10 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Play
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -76,8 +76,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public override bool HandleInput => State == Visibility.Visible;
|
||||
|
||||
protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In);
|
||||
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In);
|
||||
protected override void PopIn() => this.FadeIn(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.
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||
|
@ -143,7 +143,7 @@ namespace osu.Game.Screens.Play
|
||||
protected override bool OnExiting(Screen next)
|
||||
{
|
||||
Content.ScaleTo(0.7f, 150, EasingTypes.InQuint);
|
||||
FadeOut(150);
|
||||
this.FadeOut(150);
|
||||
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
@ -100,9 +100,9 @@ namespace osu.Game.Screens.Play
|
||||
return;
|
||||
}
|
||||
|
||||
FadeInFromZero(fade_time);
|
||||
this.FadeInFromZero(fade_time);
|
||||
using (BeginAbsoluteSequence(beginFadeTime))
|
||||
FadeOut(fade_time);
|
||||
this.FadeOut(fade_time);
|
||||
|
||||
button.Action = () => AudioClock?.Seek(startTime - skip_required_cutoff - fade_time);
|
||||
|
||||
@ -154,14 +154,14 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
case Visibility.Visible:
|
||||
if (lastState == Visibility.Hidden)
|
||||
FadeIn(500, EasingTypes.OutExpo);
|
||||
this.FadeIn(500, EasingTypes.OutExpo);
|
||||
|
||||
if (!IsHovered)
|
||||
using (BeginDelayedSequence(1000))
|
||||
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
||||
break;
|
||||
case Visibility.Hidden:
|
||||
FadeOut(1000, EasingTypes.OutExpo);
|
||||
this.FadeOut(1000, EasingTypes.OutExpo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -123,18 +123,18 @@ namespace osu.Game.Screens.Play
|
||||
private void updateBarVisibility()
|
||||
{
|
||||
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()
|
||||
{
|
||||
updateBarVisibility();
|
||||
FadeIn(500, EasingTypes.OutQuint);
|
||||
this.FadeIn(500, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
FadeOut(100);
|
||||
this.FadeOut(100);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -51,14 +51,14 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
MoveToX(0, 800, EasingTypes.OutQuint);
|
||||
RotateTo(0, 800, EasingTypes.OutQuint);
|
||||
this.MoveToX(0, 800, EasingTypes.OutQuint);
|
||||
this.RotateTo(0, 800, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
MoveToX(-100, 800, EasingTypes.InQuint);
|
||||
RotateTo(10, 800, EasingTypes.InQuint);
|
||||
this.MoveToX(-100, 800, EasingTypes.InQuint);
|
||||
this.RotateTo(10, 800, EasingTypes.InQuint);
|
||||
}
|
||||
|
||||
public void UpdateBeatmap(WorkingBeatmap beatmap)
|
||||
@ -84,7 +84,7 @@ namespace osu.Game.Screens.Select
|
||||
Shear = -Shear,
|
||||
OnLoadComplete = d =>
|
||||
{
|
||||
FadeIn(250);
|
||||
this.FadeIn(250);
|
||||
|
||||
lastContainer?.FadeOut(250);
|
||||
lastContainer?.Expire();
|
||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
nameLabel.MoveToX(150);
|
||||
break;
|
||||
case Visibility.Visible:
|
||||
FadeIn(200);
|
||||
this.FadeIn(200);
|
||||
content.MoveToY(0, 800, EasingTypes.OutQuint);
|
||||
|
||||
Delay(100, true);
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Select.Options
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
this.FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
|
||||
if (buttonsContainer.Position.X == 1 || Alpha == 0)
|
||||
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.TransformSpacingTo(new Vector2(200f, 0f), transition_duration, EasingTypes.InSine);
|
||||
|
||||
FadeOut(transition_duration, EasingTypes.InQuint);
|
||||
this.FadeOut(transition_duration, EasingTypes.InQuint);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
@ -308,10 +308,14 @@ namespace osu.Game.Screens.Tournament
|
||||
Scrolling
|
||||
}
|
||||
|
||||
public class TransformScrollSpeed : TransformFloat<Drawable>
|
||||
public class TransformScrollSpeed : TransformFloat<ScrollingTeamContainer>
|
||||
{
|
||||
public override void Apply(Drawable d) => ((ScrollingTeamContainer)d).speed = CurrentValue;
|
||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((ScrollingTeamContainer)d).speed;
|
||||
public TransformScrollSpeed(ScrollingTeamContainer target) : base(target)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Apply(ScrollingTeamContainer d) => d.speed = CurrentValue;
|
||||
public override void ReadIntoStartValue(ScrollingTeamContainer d) => StartValue = d.speed;
|
||||
}
|
||||
|
||||
public class ScrollingTeam : Container
|
||||
|
Reference in New Issue
Block a user