mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 01:23:24 +08:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into percentage
This commit is contained in:
commit
b409a22309
@ -1 +1 @@
|
|||||||
Subproject commit dcbd7a0b6f536f6aadf13a720db40a1d76bf52e2
|
Subproject commit fc93e11439b8b391d9e01e208368d96ba85bfa26
|
@ -12,16 +12,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
{
|
{
|
||||||
public class FollowPoint : Container
|
public class FollowPoint : Container
|
||||||
{
|
{
|
||||||
public double StartTime;
|
|
||||||
public double EndTime;
|
|
||||||
public Vector2 EndPosition;
|
|
||||||
|
|
||||||
private const float width = 8;
|
private const float width = 8;
|
||||||
|
|
||||||
public FollowPoint()
|
public FollowPoint()
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
Alpha = 0;
|
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
@ -45,22 +40,5 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Delay(StartTime);
|
|
||||||
FadeIn(DrawableOsuHitObject.TIME_FADEIN);
|
|
||||||
ScaleTo(1.5f);
|
|
||||||
ScaleTo(1, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
|
|
||||||
MoveTo(EndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
|
|
||||||
|
|
||||||
Delay(EndTime - StartTime);
|
|
||||||
FadeOut(DrawableOsuHitObject.TIME_FADEIN);
|
|
||||||
|
|
||||||
Delay(DrawableOsuHitObject.TIME_FADEIN);
|
|
||||||
Expire(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||||
@ -80,14 +81,28 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
double fadeOutTime = startTime + fraction * duration;
|
double fadeOutTime = startTime + fraction * duration;
|
||||||
double fadeInTime = fadeOutTime - PreEmpt;
|
double fadeInTime = fadeOutTime - PreEmpt;
|
||||||
|
|
||||||
Add(new FollowPoint
|
FollowPoint fp;
|
||||||
|
|
||||||
|
Add(fp = new FollowPoint
|
||||||
{
|
{
|
||||||
StartTime = fadeInTime,
|
|
||||||
EndTime = fadeOutTime,
|
|
||||||
Position = pointStartPosition,
|
Position = pointStartPosition,
|
||||||
EndPosition = pointEndPosition,
|
|
||||||
Rotation = rotation,
|
Rotation = rotation,
|
||||||
|
Alpha = 0,
|
||||||
|
Scale = new Vector2(1.5f),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
using (fp.BeginAbsoluteSequence(fadeInTime))
|
||||||
|
{
|
||||||
|
fp.FadeIn(DrawableOsuHitObject.TIME_FADEIN);
|
||||||
|
fp.ScaleTo(1, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
|
||||||
|
|
||||||
|
fp.MoveTo(pointEndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
|
||||||
|
|
||||||
|
fp.Delay(fadeOutTime - fadeInTime);
|
||||||
|
fp.FadeOut(DrawableOsuHitObject.TIME_FADEIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
fp.Expire(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prevHitObject = currHitObject;
|
prevHitObject = currHitObject;
|
||||||
|
@ -104,10 +104,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ApproachCircle.ScaleTo(1.1f, TIME_PREEMPT);
|
ApproachCircle.ScaleTo(1.1f, TIME_PREEMPT);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
{
|
{
|
||||||
base.UpdateState(state);
|
|
||||||
|
|
||||||
ApproachCircle.FadeOut();
|
ApproachCircle.FadeOut();
|
||||||
|
|
||||||
double endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
double endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
|
@ -21,17 +21,23 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.Hit300 };
|
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.Hit300 };
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected sealed override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
Flush();
|
Flush();
|
||||||
|
|
||||||
UpdateInitialState();
|
UpdateInitialState();
|
||||||
|
|
||||||
Delay(HitObject.StartTime - Time.Current - TIME_PREEMPT + Judgement.TimeOffset, true);
|
using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true))
|
||||||
|
{
|
||||||
|
UpdatePreemptState();
|
||||||
|
|
||||||
UpdatePreemptState();
|
using (BeginDelayedSequence(TIME_PREEMPT + Judgement.TimeOffset, true))
|
||||||
|
UpdateCurrentState(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Delay(TIME_PREEMPT, true);
|
protected virtual void UpdateCurrentState(ArmedState state)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void UpdatePreemptState()
|
protected virtual void UpdatePreemptState()
|
||||||
|
@ -158,10 +158,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ball.Alpha = 0;
|
ball.Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
{
|
{
|
||||||
base.UpdateState(state);
|
|
||||||
|
|
||||||
ball.FadeIn();
|
ball.FadeIn();
|
||||||
|
|
||||||
Delay(slider.Duration, true);
|
Delay(slider.Duration, true);
|
||||||
@ -181,4 +179,4 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
void UpdateProgress(double progress, int repeat);
|
void UpdateProgress(double progress, int repeat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,10 +72,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Delay(-animIn);
|
Delay(-animIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
{
|
{
|
||||||
base.UpdateState(state);
|
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
@ -93,4 +91,4 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,10 +132,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
disc.FadeIn(200);
|
disc.FadeIn(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
{
|
{
|
||||||
base.UpdateState(state);
|
|
||||||
|
|
||||||
Delay(spinner.Duration, true);
|
Delay(spinner.Duration, true);
|
||||||
|
|
||||||
FadeOut(160);
|
FadeOut(160);
|
||||||
|
@ -148,9 +148,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
var completion = (float)userHits / HitObject.RequiredHits;
|
var completion = (float)userHits / HitObject.RequiredHits;
|
||||||
|
|
||||||
expandingRing.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50);
|
expandingRing.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50);
|
||||||
expandingRing.Delay(50);
|
using (expandingRing.BeginDelayedSequence(50))
|
||||||
expandingRing.FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
expandingRing.FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
||||||
expandingRing.DelayReset();
|
|
||||||
|
|
||||||
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
// 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 System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Configuration;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Drawables
|
namespace osu.Game.Beatmaps.Drawables
|
||||||
{
|
{
|
||||||
@ -23,8 +22,6 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
private readonly SpriteText title;
|
private readonly SpriteText title;
|
||||||
private readonly SpriteText artist;
|
private readonly SpriteText artist;
|
||||||
|
|
||||||
private Bindable<bool> preferUnicode;
|
|
||||||
|
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
private readonly FillFlowContainer difficultyIcons;
|
private readonly FillFlowContainer difficultyIcons;
|
||||||
|
|
||||||
@ -82,15 +79,10 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(LocalisationEngine localisation)
|
||||||
{
|
{
|
||||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
title.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.TitleUnicode, beatmap.BeatmapSetInfo.Metadata.Title);
|
||||||
preferUnicode.ValueChanged += unicode =>
|
artist.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.ArtistUnicode, beatmap.BeatmapSetInfo.Metadata.Artist);
|
||||||
{
|
|
||||||
title.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.TitleUnicode : beatmap.BeatmapSetInfo.Metadata.Title;
|
|
||||||
artist.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.ArtistUnicode : beatmap.BeatmapSetInfo.Metadata.Artist;
|
|
||||||
};
|
|
||||||
preferUnicode.TriggerChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PanelBackground : BufferedContainer
|
private class PanelBackground : BufferedContainer
|
||||||
@ -112,7 +104,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
Depth = -1,
|
Depth = -1,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
|
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
|
||||||
Shear = new Vector2(0.8f, 0),
|
Shear = new Vector2(0.8f, 0),
|
||||||
Alpha = 0.5f,
|
Alpha = 0.5f,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
|
@ -92,7 +92,6 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true;
|
Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true;
|
||||||
Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true;
|
Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true;
|
||||||
Set(OsuConfig.IgnoreList, string.Empty).Disabled = true;
|
Set(OsuConfig.IgnoreList, string.Empty).Disabled = true;
|
||||||
Set(OsuConfig.Language, @"unknown").Disabled = true;
|
|
||||||
Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true;
|
Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true;
|
||||||
Set(OsuConfig.LastVersion, string.Empty).Disabled = true;
|
Set(OsuConfig.LastVersion, string.Empty).Disabled = true;
|
||||||
Set(OsuConfig.LastVersionPermissionsFailed, string.Empty).Disabled = true;
|
Set(OsuConfig.LastVersionPermissionsFailed, string.Empty).Disabled = true;
|
||||||
@ -163,16 +162,6 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuConfig.UpdateFailCount, 0).Disabled = true;
|
Set(OsuConfig.UpdateFailCount, 0).Disabled = true;
|
||||||
//Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true;
|
//Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true;
|
||||||
//Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true;
|
//Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true;
|
||||||
bool unicodeDefault = false;
|
|
||||||
switch (Get<string>(OsuConfig.Language))
|
|
||||||
{
|
|
||||||
case @"zh":
|
|
||||||
case @"ja":
|
|
||||||
case @"ko":
|
|
||||||
unicodeDefault = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Set(OsuConfig.ShowUnicode, unicodeDefault);
|
|
||||||
Set(OsuConfig.PermanentSongInfo, false).Disabled = true;
|
Set(OsuConfig.PermanentSongInfo, false).Disabled = true;
|
||||||
Set(OsuConfig.Ticker, false).Disabled = true;
|
Set(OsuConfig.Ticker, false).Disabled = true;
|
||||||
Set(OsuConfig.CompatibilityContext, false).Disabled = true;
|
Set(OsuConfig.CompatibilityContext, false).Disabled = true;
|
||||||
@ -339,7 +328,6 @@ namespace osu.Game.Configuration
|
|||||||
SaveUsername,
|
SaveUsername,
|
||||||
TreeSortMode,
|
TreeSortMode,
|
||||||
TreeSortMode2,
|
TreeSortMode2,
|
||||||
ShowUnicode,
|
|
||||||
PermanentSongInfo,
|
PermanentSongInfo,
|
||||||
Ticker,
|
Ticker,
|
||||||
CompatibilityContext,
|
CompatibilityContext,
|
||||||
|
@ -131,14 +131,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
foreach (var star in stars.Children)
|
foreach (var star in stars.Children)
|
||||||
{
|
{
|
||||||
star.ClearTransforms(true);
|
star.ClearTransforms(true);
|
||||||
if (count <= newValue)
|
|
||||||
star.Delay(Math.Max(i - count, 0) * animationDelay, true);
|
|
||||||
else
|
|
||||||
star.Delay(Math.Max(count - 1 - i, 0) * animationDelay, true);
|
|
||||||
|
|
||||||
star.FadeTo(i < newValue ? 1.0f : minStarAlpha, fadingDuration);
|
var delay = (count <= newValue ? Math.Max(i - count, 0) : Math.Max(count - 1 - i, 0)) * animationDelay;
|
||||||
star.Icon.ScaleTo(getStarScale(i, newValue), scalingDuration, scalingEasing);
|
|
||||||
star.DelayReset();
|
using (BeginDelayedSequence(delay, true))
|
||||||
|
{
|
||||||
|
star.FadeTo(i < newValue ? 1.0f : minStarAlpha, fadingDuration);
|
||||||
|
star.Icon.ScaleTo(getStarScale(i, newValue), scalingDuration, scalingEasing);
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -10,20 +10,20 @@ using OpenTK.Graphics;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Framework.Graphics.Primitives;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Framework.Extensions;
|
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
@ -41,9 +41,9 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private TrackManager trackManager;
|
private TrackManager trackManager;
|
||||||
private Bindable<WorkingBeatmap> beatmapSource;
|
private Bindable<WorkingBeatmap> beatmapSource;
|
||||||
private Bindable<bool> preferUnicode;
|
|
||||||
private WorkingBeatmap current;
|
private WorkingBeatmap current;
|
||||||
private BeatmapDatabase beatmaps;
|
private BeatmapDatabase beatmaps;
|
||||||
|
private LocalisationEngine localisation;
|
||||||
|
|
||||||
private Container dragContainer;
|
private Container dragContainer;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase game, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours)
|
private void load(OsuGameBase game, BeatmapDatabase beatmaps, OsuColour colours, LocalisationEngine localisation)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -187,8 +187,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
trackManager = game.Audio.Track;
|
trackManager = game.Audio.Track;
|
||||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
this.localisation = localisation;
|
||||||
preferUnicode.ValueChanged += unicode => updateDisplay(current, TransformDirection.None);
|
|
||||||
|
|
||||||
beatmapSource = game.Beatmap ?? new Bindable<WorkingBeatmap>();
|
beatmapSource = game.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||||
playList = beatmaps.GetAllWithChildren<BeatmapSetInfo>();
|
playList = beatmaps.GetAllWithChildren<BeatmapSetInfo>();
|
||||||
@ -308,16 +307,19 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
if (beatmap?.Beatmap == null)
|
if (beatmap?.Beatmap == null) //this is not needed if a placeholder exists
|
||||||
{
|
{
|
||||||
|
title.Current = null;
|
||||||
title.Text = @"Nothing to play";
|
title.Text = @"Nothing to play";
|
||||||
|
|
||||||
|
artist.Current = null;
|
||||||
artist.Text = @"Nothing to play";
|
artist.Text = @"Nothing to play";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BeatmapMetadata metadata = beatmap.Beatmap.BeatmapInfo.Metadata;
|
BeatmapMetadata metadata = beatmap.Beatmap.BeatmapInfo.Metadata;
|
||||||
title.Text = preferUnicode ? metadata.TitleUnicode : metadata.Title;
|
title.Current = localisation.GetUnicodePreference(metadata.TitleUnicode, metadata.Title);
|
||||||
artist.Text = preferUnicode ? metadata.ArtistUnicode : metadata.Artist;
|
artist.Current = localisation.GetUnicodePreference(metadata.ArtistUnicode, metadata.Artist);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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 osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
protected override string Header => "Language";
|
protected override string Header => "Language";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager osuConfig, FrameworkConfigManager frameworkConfig)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -21,12 +22,12 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Prefer metadata in original language",
|
LabelText = "Prefer metadata in original language",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowUnicode)
|
Bindable = frameworkConfig.GetBindable<bool>(FrameworkConfig.ShowUnicode)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Use alternative font for chat display",
|
LabelText = "Use alternative font for chat display",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.AlternativeChatFont)
|
Bindable = osuConfig.GetBindable<bool>(OsuConfig.AlternativeChatFont)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
public class PlayerInputManager : PassThroughInputManager
|
public class PlayerInputManager : PassThroughInputManager
|
||||||
{
|
{
|
||||||
private readonly ManualClock clock = new ManualClock();
|
private ManualClock clock;
|
||||||
private IFrameBasedClock parentClock;
|
private IFrameBasedClock parentClock;
|
||||||
|
|
||||||
private ReplayInputHandler replayInputHandler;
|
private ReplayInputHandler replayInputHandler;
|
||||||
@ -47,8 +47,14 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
//our clock will now be our parent's clock, but we want to replace this to allow manual control.
|
||||||
parentClock = Clock;
|
parentClock = Clock;
|
||||||
Clock = new FramedClock(clock);
|
|
||||||
|
Clock = new FramedClock(clock = new ManualClock
|
||||||
|
{
|
||||||
|
CurrentTime = parentClock.CurrentTime,
|
||||||
|
Rate = parentClock.Rate,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -70,24 +70,26 @@ namespace osu.Game.Screens.Ranking
|
|||||||
circleOuterBackground.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuterBackground.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
circleOuterBackground.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuterBackground.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Content.Delay(transition_time * 0.25f, true);
|
using (BeginDelayedSequence(transition_time * 0.25f, true))
|
||||||
|
{
|
||||||
|
|
||||||
circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Content.Delay(transition_time * 0.3f, true);
|
using (BeginDelayedSequence(transition_time * 0.3f, true))
|
||||||
|
{
|
||||||
|
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
circleInner.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
circleInner.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
circleInner.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
using (BeginDelayedSequence(transition_time * 0.4f, true))
|
||||||
circleInner.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
{
|
||||||
|
modeChangeButtons.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
Content.Delay(transition_time * 0.4f, true);
|
currentPage.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
|
}
|
||||||
modeChangeButtons.FadeIn(transition_time, EasingTypes.OutQuint);
|
}
|
||||||
currentPage.FadeIn(transition_time, EasingTypes.OutQuint);
|
}
|
||||||
|
|
||||||
Content.DelayReset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
|
@ -1,30 +1,29 @@
|
|||||||
// 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 System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Game.Configuration;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Select.Leaderboards;
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Screens.Play;
|
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
using osu.Framework.Graphics.Colour;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
@ -272,8 +271,6 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
private readonly BeatmapInfo beatmap;
|
private readonly BeatmapInfo beatmap;
|
||||||
|
|
||||||
private Bindable<bool> preferUnicode;
|
|
||||||
|
|
||||||
private readonly OsuSpriteText title;
|
private readonly OsuSpriteText title;
|
||||||
private readonly OsuSpriteText artist;
|
private readonly OsuSpriteText artist;
|
||||||
private readonly OsuSpriteText versionMapper;
|
private readonly OsuSpriteText versionMapper;
|
||||||
@ -323,20 +320,14 @@ namespace osu.Game.Screens.Ranking
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, OsuConfigManager config)
|
private void load(OsuColour colours, LocalisationEngine localisation)
|
||||||
{
|
{
|
||||||
title.Colour = artist.Colour = colours.BlueDarker;
|
title.Colour = artist.Colour = colours.BlueDarker;
|
||||||
versionMapper.Colour = colours.Gray8;
|
versionMapper.Colour = colours.Gray8;
|
||||||
|
|
||||||
versionMapper.Text = $"{beatmap.Version} - mapped by {beatmap.Metadata.Author}";
|
versionMapper.Text = $"{beatmap.Version} - mapped by {beatmap.Metadata.Author}";
|
||||||
|
title.Current = localisation.GetUnicodePreference(beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title);
|
||||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
artist.Current = localisation.GetUnicodePreference(beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist);
|
||||||
preferUnicode.ValueChanged += unicode =>
|
|
||||||
{
|
|
||||||
title.Text = unicode ? beatmap.Metadata.TitleUnicode : beatmap.Metadata.Title;
|
|
||||||
artist.Text = unicode ? beatmap.Metadata.ArtistUnicode : beatmap.Metadata.Artist;
|
|
||||||
};
|
|
||||||
preferUnicode.TriggerChange();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
speedTo(0f, 2000);
|
speedTo(0f, 2000);
|
||||||
tracker.FadeIn(200);
|
tracker.FadeIn(200);
|
||||||
|
|
||||||
delayedStateChangeDelegate = Delay(2300).Schedule(() => scrollState = ScrollState.Stopped);
|
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Stopped, 2300);
|
||||||
break;
|
break;
|
||||||
case ScrollState.Stopped:
|
case ScrollState.Stopped:
|
||||||
// Find closest to center
|
// Find closest to center
|
||||||
@ -144,7 +144,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
st.Selected = true;
|
st.Selected = true;
|
||||||
OnSelected?.Invoke(st.Team);
|
OnSelected?.Invoke(st.Team);
|
||||||
|
|
||||||
delayedStateChangeDelegate = Delay(10000).Schedule(() => scrollState = ScrollState.Idle);
|
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Idle, 10000);
|
||||||
break;
|
break;
|
||||||
case ScrollState.Idle:
|
case ScrollState.Idle:
|
||||||
resetSelected();
|
resetSelected();
|
||||||
@ -295,11 +295,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None)
|
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None) => TransformTo(() => speed, value, duration, easing, new TransformScrollSpeed());
|
||||||
{
|
|
||||||
DelayReset();
|
|
||||||
TransformTo(() => speed, value, duration, easing, new TransformScrollSpeed());
|
|
||||||
}
|
|
||||||
|
|
||||||
private enum ScrollState
|
private enum ScrollState
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user