mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Fix osu! gameplay cursor not adjusting to mod/convert circle size changes
This commit is contained in:
42
osu.Game/Screens/Play/GameplayBeatmap.cs
Normal file
42
osu.Game/Screens/Play/GameplayBeatmap.cs
Normal file
@ -0,0 +1,42 @@
|
||||
// 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 System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class GameplayBeatmap : Component, IBeatmap
|
||||
{
|
||||
public readonly IBeatmap PlayableBeatmap;
|
||||
|
||||
public GameplayBeatmap(IBeatmap playableBeatmap)
|
||||
{
|
||||
PlayableBeatmap = playableBeatmap;
|
||||
}
|
||||
|
||||
public BeatmapInfo BeatmapInfo
|
||||
{
|
||||
get => PlayableBeatmap.BeatmapInfo;
|
||||
set => PlayableBeatmap.BeatmapInfo = value;
|
||||
}
|
||||
|
||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||
|
||||
public ControlPointInfo ControlPointInfo => PlayableBeatmap.ControlPointInfo;
|
||||
|
||||
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
||||
|
||||
public double TotalBreakTime => PlayableBeatmap.TotalBreakTime;
|
||||
|
||||
public IReadOnlyList<HitObject> HitObjects => PlayableBeatmap.HitObjects;
|
||||
|
||||
public IEnumerable<BeatmapStatistic> GetStatistics() => PlayableBeatmap.GetStatistics();
|
||||
|
||||
public IBeatmap Clone() => PlayableBeatmap.Clone();
|
||||
}
|
||||
}
|
@ -110,6 +110,13 @@ namespace osu.Game.Screens.Play
|
||||
this.showResults = showResults;
|
||||
}
|
||||
|
||||
private GameplayBeatmap gameplayBeatmap;
|
||||
|
||||
private DependencyContainer dependencies;
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, IAPIProvider api, OsuConfigManager config)
|
||||
{
|
||||
@ -143,6 +150,10 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
InternalChild = GameplayClockContainer = new GameplayClockContainer(Beatmap.Value, Mods.Value, DrawableRuleset.GameplayStartTime);
|
||||
|
||||
AddInternal(gameplayBeatmap = new GameplayBeatmap(playableBeatmap));
|
||||
|
||||
dependencies.CacheAs(gameplayBeatmap);
|
||||
|
||||
addUnderlayComponents(GameplayClockContainer);
|
||||
addGameplayComponents(GameplayClockContainer, Beatmap.Value);
|
||||
addOverlayComponents(GameplayClockContainer, Beatmap.Value);
|
||||
|
Reference in New Issue
Block a user