mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Merge branch 'master' into scroll-to-20
This commit is contained in:
commit
360f26c13d
@ -40,6 +40,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void SetUp() => Schedule(() =>
|
public void SetUp() => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
SelectedMods.Value = Array.Empty<Mod>();
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
modSelect = new TestModSelectOverlay
|
modSelect = new TestModSelectOverlay
|
||||||
@ -134,6 +135,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestExternallySetCustomizedMod()
|
public void TestExternallySetCustomizedMod()
|
||||||
{
|
{
|
||||||
|
changeRuleset(0);
|
||||||
|
|
||||||
AddStep("set customized mod externally", () => SelectedMods.Value = new[] { new OsuModDoubleTime { SpeedChange = { Value = 1.01 } } });
|
AddStep("set customized mod externally", () => SelectedMods.Value = new[] { new OsuModDoubleTime { SpeedChange = { Value = 1.01 } } });
|
||||||
|
|
||||||
AddAssert("ensure button is selected and customized accordingly", () =>
|
AddAssert("ensure button is selected and customized accordingly", () =>
|
||||||
|
@ -24,6 +24,10 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
private Bindable<bool> parallaxEnabled;
|
private Bindable<bool> parallaxEnabled;
|
||||||
|
|
||||||
|
private const float parallax_duration = 100;
|
||||||
|
|
||||||
|
private bool firstUpdate = true;
|
||||||
|
|
||||||
public ParallaxContainer()
|
public ParallaxContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -60,17 +64,27 @@ namespace osu.Game.Graphics.Containers
|
|||||||
input = GetContainingInputManager();
|
input = GetContainingInputManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool firstUpdate = true;
|
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (parallaxEnabled.Value)
|
if (parallaxEnabled.Value)
|
||||||
{
|
{
|
||||||
Vector2 offset = (input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.Position) - DrawSize / 2) * ParallaxAmount;
|
Vector2 offset = Vector2.Zero;
|
||||||
|
|
||||||
const float parallax_duration = 100;
|
if (input.CurrentState.Mouse != null)
|
||||||
|
{
|
||||||
|
var sizeDiv2 = DrawSize / 2;
|
||||||
|
|
||||||
|
Vector2 relativeAmount = ToLocalSpace(input.CurrentState.Mouse.Position) - sizeDiv2;
|
||||||
|
|
||||||
|
const float base_factor = 0.999f;
|
||||||
|
|
||||||
|
relativeAmount.X = (float)(Math.Sign(relativeAmount.X) * Interpolation.Damp(0, 1, base_factor, Math.Abs(relativeAmount.X)));
|
||||||
|
relativeAmount.Y = (float)(Math.Sign(relativeAmount.Y) * Interpolation.Damp(0, 1, base_factor, Math.Abs(relativeAmount.Y)));
|
||||||
|
|
||||||
|
offset = relativeAmount * sizeDiv2 * ParallaxAmount;
|
||||||
|
}
|
||||||
|
|
||||||
double elapsed = Math.Clamp(Clock.ElapsedFrameTime, 0, parallax_duration);
|
double elapsed = Math.Clamp(Clock.ElapsedFrameTime, 0, parallax_duration);
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ namespace osu.Game.Online.Chat
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Joins a channel if it has not already been joined.
|
/// Joins a channel if it has not already been joined. Must be called from the update thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="channel">The channel to join.</param>
|
/// <param name="channel">The channel to join.</param>
|
||||||
/// <returns>The joined channel. Note that this may not match the parameter channel as it is a backed object.</returns>
|
/// <returns>The joined channel. Note that this may not match the parameter channel as it is a backed object.</returns>
|
||||||
@ -399,7 +399,11 @@ namespace osu.Game.Online.Chat
|
|||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LeaveChannel(Channel channel)
|
/// <summary>
|
||||||
|
/// Leave the specified channel. Can be called from any thread.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="channel">The channel to leave.</param>
|
||||||
|
public void LeaveChannel(Channel channel) => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (channel == null) return;
|
if (channel == null) return;
|
||||||
|
|
||||||
@ -413,7 +417,7 @@ namespace osu.Game.Online.Chat
|
|||||||
api.Queue(new LeaveChannelRequest(channel));
|
api.Queue(new LeaveChannelRequest(channel));
|
||||||
channel.Joined.Value = false;
|
channel.Joined.Value = false;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
private long lastMessageId;
|
private long lastMessageId;
|
||||||
|
|
||||||
|
@ -190,13 +190,13 @@ namespace osu.Game.Overlays.Chat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
updateMessageContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
updateMessageContent();
|
||||||
FinishTransforms(true);
|
FinishTransforms(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +49,12 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
Spacing = new Vector2(10, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new AddFriendButton
|
new FollowersButton
|
||||||
|
{
|
||||||
|
User = { BindTarget = User }
|
||||||
|
},
|
||||||
|
new MappingSubscribersButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
User = { BindTarget = User }
|
User = { BindTarget = User }
|
||||||
},
|
},
|
||||||
new MessageUserButton
|
new MessageUserButton
|
||||||
@ -69,7 +72,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
Width = UserProfileOverlay.CONTENT_X_MARGIN,
|
Width = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
Child = new ExpandDetailsButton
|
Child = new ExpandDetailsButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
DetailsVisible = { BindTarget = DetailsVisible }
|
DetailsVisible = { BindTarget = DetailsVisible }
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Users;
|
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Header.Components
|
|
||||||
{
|
|
||||||
public class AddFriendButton : ProfileHeaderButton
|
|
||||||
{
|
|
||||||
public readonly Bindable<User> User = new Bindable<User>();
|
|
||||||
|
|
||||||
public override string TooltipText => "friends";
|
|
||||||
|
|
||||||
private OsuSpriteText followerText;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Child = new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Padding = new MarginPadding { Right = 10 },
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new SpriteIcon
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Icon = FontAwesome.Solid.User,
|
|
||||||
FillMode = FillMode.Fit,
|
|
||||||
Size = new Vector2(50, 14)
|
|
||||||
},
|
|
||||||
followerText = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// todo: when friending/unfriending is implemented, the APIAccess.Friends list should be updated accordingly.
|
|
||||||
|
|
||||||
User.BindValueChanged(user => updateFollowers(user.NewValue), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateFollowers(User user) => followerText.Text = user?.FollowerCount.ToString("#,##0");
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Header.Components
|
||||||
|
{
|
||||||
|
public class FollowersButton : ProfileHeaderStatisticsButton
|
||||||
|
{
|
||||||
|
public readonly Bindable<User> User = new Bindable<User>();
|
||||||
|
|
||||||
|
public override string TooltipText => "followers";
|
||||||
|
|
||||||
|
protected override IconUsage Icon => FontAwesome.Solid.User;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
// todo: when friending/unfriending is implemented, the APIAccess.Friends list should be updated accordingly.
|
||||||
|
User.BindValueChanged(user => SetValue(user.NewValue?.FollowerCount ?? 0), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Header.Components
|
||||||
|
{
|
||||||
|
public class MappingSubscribersButton : ProfileHeaderStatisticsButton
|
||||||
|
{
|
||||||
|
public readonly Bindable<User> User = new Bindable<User>();
|
||||||
|
|
||||||
|
public override string TooltipText => "mapping subscribers";
|
||||||
|
|
||||||
|
protected override IconUsage Icon => FontAwesome.Solid.Bell;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
User.BindValueChanged(user => SetValue(user.NewValue?.MappingFollowerCount ?? 0), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -33,7 +33,6 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
public MessageUserButton()
|
public MessageUserButton()
|
||||||
{
|
{
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
RelativeSizeAxes = Axes.Y;
|
|
||||||
|
|
||||||
Child = new SpriteIcon
|
Child = new SpriteIcon
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
protected ProfileHeaderButton()
|
protected ProfileHeaderButton()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
|
Height = 40;
|
||||||
|
|
||||||
base.Content.Add(new CircularContainer
|
base.Content.Add(new CircularContainer
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Header.Components
|
||||||
|
{
|
||||||
|
public abstract class ProfileHeaderStatisticsButton : ProfileHeaderButton
|
||||||
|
{
|
||||||
|
private readonly OsuSpriteText drawableText;
|
||||||
|
|
||||||
|
protected ProfileHeaderStatisticsButton()
|
||||||
|
{
|
||||||
|
Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new SpriteIcon
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Icon = Icon,
|
||||||
|
FillMode = FillMode.Fit,
|
||||||
|
Size = new Vector2(50, 14)
|
||||||
|
},
|
||||||
|
drawableText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Margin = new MarginPadding { Right = 10 },
|
||||||
|
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract IconUsage Icon { get; }
|
||||||
|
|
||||||
|
protected void SetValue(int value) => drawableText.Text = value.ToString("#,##0");
|
||||||
|
}
|
||||||
|
}
|
@ -332,7 +332,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
EditorBeatmap.Add(hitObject);
|
EditorBeatmap.Add(hitObject);
|
||||||
|
|
||||||
if (EditorClock.CurrentTime < hitObject.StartTime)
|
if (EditorClock.CurrentTime < hitObject.StartTime)
|
||||||
EditorClock.SeekTo(hitObject.StartTime);
|
EditorClock.SeekSmoothlyTo(hitObject.StartTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
float markerPos = Math.Clamp(ToLocalSpace(screenPosition).X, 0, DrawWidth);
|
float markerPos = Math.Clamp(ToLocalSpace(screenPosition).X, 0, DrawWidth);
|
||||||
editorClock.SeekTo(markerPos / DrawWidth * editorClock.TrackLength);
|
editorClock.SeekSmoothlyTo(markerPos / DrawWidth * editorClock.TrackLength);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
if (clickedBlueprint == null || SelectionHandler.SelectedBlueprints.FirstOrDefault(b => b.IsHovered) != clickedBlueprint)
|
if (clickedBlueprint == null || SelectionHandler.SelectedBlueprints.FirstOrDefault(b => b.IsHovered) != clickedBlueprint)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
EditorClock?.SeekTo(clickedBlueprint.HitObject.StartTime);
|
EditorClock?.SeekSmoothlyTo(clickedBlueprint.HitObject.StartTime);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,12 +155,14 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
seekTrackToCurrent();
|
seekTrackToCurrent();
|
||||||
else if (!editorClock.IsRunning)
|
else if (!editorClock.IsRunning)
|
||||||
{
|
{
|
||||||
// The track isn't running. There are two cases we have to be wary of:
|
// The track isn't running. There are three cases we have to be wary of:
|
||||||
// 1) The user flick-drags on this timeline: We want the track to follow us
|
// 1) The user flick-drags on this timeline and we are applying an interpolated seek on the clock, until interrupted by 2 or 3.
|
||||||
// 2) The user changes the track time through some other means (scrolling in the editor or overview timeline): We want to follow the track time
|
// 2) The user changes the track time through some other means (scrolling in the editor or overview timeline; clicking a hitobject etc.). We want the timeline to track the clock's time.
|
||||||
|
// 3) An ongoing seek transform is running from an external seek. We want the timeline to track the clock's time.
|
||||||
|
|
||||||
// The simplest way to cover both cases is by checking whether the scroll position has changed and the audio hasn't been changed externally
|
// The simplest way to cover the first two cases is by checking whether the scroll position has changed and the audio hasn't been changed externally
|
||||||
if (Current != lastScrollPosition && editorClock.CurrentTime == lastTrackTime)
|
// Checking IsSeeking covers the third case, where the transform may not have been applied yet.
|
||||||
|
if (Current != lastScrollPosition && editorClock.CurrentTime == lastTrackTime && !editorClock.IsSeeking)
|
||||||
seekTrackToCurrent();
|
seekTrackToCurrent();
|
||||||
else
|
else
|
||||||
scrollToTrackTime();
|
scrollToTrackTime();
|
||||||
|
@ -35,6 +35,11 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private readonly Bindable<bool> seekingOrStopped = new Bindable<bool>(true);
|
private readonly Bindable<bool> seekingOrStopped = new Bindable<bool>(true);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a seek is currently in progress. True for the duration of a seek performed via <see cref="SeekSmoothlyTo"/>.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSeeking { get; private set; }
|
||||||
|
|
||||||
public EditorClock(WorkingBeatmap beatmap, BindableBeatDivisor beatDivisor)
|
public EditorClock(WorkingBeatmap beatmap, BindableBeatDivisor beatDivisor)
|
||||||
: this(beatmap.Beatmap.ControlPointInfo, beatmap.Track.Length, beatDivisor)
|
: this(beatmap.Beatmap.ControlPointInfo, beatmap.Track.Length, beatDivisor)
|
||||||
{
|
{
|
||||||
@ -111,7 +116,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
if (!snapped || ControlPointInfo.TimingPoints.Count == 0)
|
if (!snapped || ControlPointInfo.TimingPoints.Count == 0)
|
||||||
{
|
{
|
||||||
SeekTo(seekTime);
|
SeekSmoothlyTo(seekTime);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,11 +150,11 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
// Ensure the sought point is within the boundaries
|
// Ensure the sought point is within the boundaries
|
||||||
seekTime = Math.Clamp(seekTime, 0, TrackLength);
|
seekTime = Math.Clamp(seekTime, 0, TrackLength);
|
||||||
SeekTo(seekTime);
|
SeekSmoothlyTo(seekTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current time of this clock, include any active transform seeks performed via <see cref="SeekTo"/>.
|
/// The current time of this clock, include any active transform seeks performed via <see cref="SeekSmoothlyTo"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double CurrentTimeAccurate =>
|
public double CurrentTimeAccurate =>
|
||||||
Transforms.OfType<TransformSeek>().FirstOrDefault()?.EndValue ?? CurrentTime;
|
Transforms.OfType<TransformSeek>().FirstOrDefault()?.EndValue ?? CurrentTime;
|
||||||
@ -176,12 +181,29 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public bool Seek(double position)
|
public bool Seek(double position)
|
||||||
{
|
{
|
||||||
seekingOrStopped.Value = true;
|
seekingOrStopped.Value = IsSeeking = true;
|
||||||
|
|
||||||
ClearTransforms();
|
ClearTransforms();
|
||||||
return underlyingClock.Seek(position);
|
return underlyingClock.Seek(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Seek smoothly to the provided destination.
|
||||||
|
/// Use <see cref="Seek"/> to perform an immediate seek.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="seekDestination"></param>
|
||||||
|
public void SeekSmoothlyTo(double seekDestination)
|
||||||
|
{
|
||||||
|
seekingOrStopped.Value = true;
|
||||||
|
|
||||||
|
if (IsRunning)
|
||||||
|
Seek(seekDestination);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
transformSeekTo(seekDestination, transform_time, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void ResetSpeedAdjustments() => underlyingClock.ResetSpeedAdjustments();
|
public void ResetSpeedAdjustments() => underlyingClock.ResetSpeedAdjustments();
|
||||||
|
|
||||||
double IAdjustableClock.Rate
|
double IAdjustableClock.Rate
|
||||||
@ -229,6 +251,8 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
if (seekingOrStopped.Value)
|
if (seekingOrStopped.Value)
|
||||||
{
|
{
|
||||||
|
IsSeeking &= Transforms.Any();
|
||||||
|
|
||||||
if (track.Value?.IsRunning != true)
|
if (track.Value?.IsRunning != true)
|
||||||
{
|
{
|
||||||
// seeking in the editor can happen while the track isn't running.
|
// seeking in the editor can happen while the track isn't running.
|
||||||
@ -239,20 +263,10 @@ namespace osu.Game.Screens.Edit
|
|||||||
// we are either running a seek tween or doing an immediate seek.
|
// we are either running a seek tween or doing an immediate seek.
|
||||||
// in the case of an immediate seek the seeking bool will be set to false after one update.
|
// in the case of an immediate seek the seeking bool will be set to false after one update.
|
||||||
// this allows for silencing hit sounds and the likes.
|
// this allows for silencing hit sounds and the likes.
|
||||||
seekingOrStopped.Value = Transforms.Any();
|
seekingOrStopped.Value = IsSeeking;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SeekTo(double seekDestination)
|
|
||||||
{
|
|
||||||
seekingOrStopped.Value = true;
|
|
||||||
|
|
||||||
if (IsRunning)
|
|
||||||
Seek(seekDestination);
|
|
||||||
else
|
|
||||||
transformSeekTo(seekDestination, transform_time, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void transformSeekTo(double seek, double duration = 0, Easing easing = Easing.None)
|
private void transformSeekTo(double seek, double duration = 0, Easing easing = Easing.None)
|
||||||
=> this.TransformTo(this.PopulateTransform(new TransformSeek(), seek, duration, easing));
|
=> this.TransformTo(this.PopulateTransform(new TransformSeek(), seek, duration, easing));
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
selectedGroup.Value = controlGroup;
|
selectedGroup.Value = controlGroup;
|
||||||
clock.SeekTo(controlGroup.Time);
|
clock.SeekSmoothlyTo(controlGroup.Time);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,5 +38,11 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
|
|||||||
|
|
||||||
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#lazermp_{roomId.Value}" });
|
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#lazermp_{roomId.Value}" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.Dispose(isDisposing);
|
||||||
|
channelManager?.LeaveChannel(Channel.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,9 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"follower_count")]
|
[JsonProperty(@"follower_count")]
|
||||||
public int FollowerCount;
|
public int FollowerCount;
|
||||||
|
|
||||||
|
[JsonProperty(@"mapping_follower_count")]
|
||||||
|
public int MappingFollowerCount;
|
||||||
|
|
||||||
[JsonProperty(@"favourite_beatmapset_count")]
|
[JsonProperty(@"favourite_beatmapset_count")]
|
||||||
public int FavouriteBeatmapsetCount;
|
public int FavouriteBeatmapsetCount;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user