1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 21:03:21 +08:00

Remove KPS acronym usage

This commit is contained in:
Ryuki 2022-08-11 09:36:35 +02:00
parent 0e1efbd865
commit 3c6461b9e4
No known key found for this signature in database
GPG Key ID: A353889EAEACBF49
6 changed files with 15 additions and 20 deletions

View File

@ -19,7 +19,7 @@ using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.UI;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD.KPSCounter;
using osu.Game.Screens.Play.HUD.KeysPerSecond;
using osuTK;
namespace osu.Game.Tests.Visual.Gameplay

View File

@ -30,7 +30,7 @@ using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD.KPSCounter;
using osu.Game.Screens.Play.HUD.KeysPerSecond;
using osuTK;
namespace osu.Game.Rulesets.UI
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.UI
/// Displays an interactive ruleset gameplay instance.
/// </summary>
/// <typeparam name="TObject">The type of HitObject contained by this DrawableRuleset.</typeparam>
public abstract class DrawableRuleset<TObject> : DrawableRuleset, IProvideCursor, ICanAttachKeyCounter, ICanAttachKpsCalculator
public abstract class DrawableRuleset<TObject> : DrawableRuleset, IProvideCursor, ICanAttachKeyCounter
where TObject : HitObject
{
public override event Action<JudgementResult> NewResult;
@ -341,7 +341,7 @@ namespace osu.Game.Rulesets.UI
public void Attach(KeyCounterDisplay keyCounter) =>
(KeyBindingInputManager as ICanAttachKeyCounter)?.Attach(keyCounter);
public void Attach(KeysPerSecondCalculator kps) => (KeyBindingInputManager as ICanAttachKpsCalculator)?.Attach(kps);
public void Attach(KeysPerSecondCalculator calculator) => (KeyBindingInputManager as ICanAttachKeyCounter)?.Attach(calculator);
/// <summary>
/// Creates a key conversion input manager. An exception will be thrown if a valid <see cref="RulesetInputManager{T}"/> is not returned.

View File

@ -20,12 +20,12 @@ using osu.Game.Input.Bindings;
using osu.Game.Input.Handlers;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD.KPSCounter;
using osu.Game.Screens.Play.HUD.KeysPerSecond;
using static osu.Game.Input.Handlers.ReplayInputHandler;
namespace osu.Game.Rulesets.UI
{
public abstract class RulesetInputManager<T> : PassThroughInputManager, ICanAttachKeyCounter, IHasReplayHandler, IHasRecordingHandler, ICanAttachKpsCalculator
public abstract class RulesetInputManager<T> : PassThroughInputManager, ICanAttachKeyCounter, IHasReplayHandler, IHasRecordingHandler
where T : struct
{
public readonly KeyBindingContainer<T> KeyBindingContainer;
@ -187,15 +187,15 @@ namespace osu.Game.Rulesets.UI
#endregion
#region KPS Counter Attachment
#region Keys per second Counter Attachment
public void Attach(KeysPerSecondCalculator kps)
public void Attach(KeysPerSecondCalculator calculator)
{
var listener = new ActionListener();
KeyBindingContainer.Add(listener);
kps.Listener = listener;
calculator.Listener = listener;
}
public class ActionListener : KeysPerSecondCalculator.InputListener, IKeyBindingHandler<T>
@ -257,11 +257,7 @@ namespace osu.Game.Rulesets.UI
public interface ICanAttachKeyCounter
{
void Attach(KeyCounterDisplay keyCounter);
}
public interface ICanAttachKpsCalculator
{
void Attach(KeysPerSecondCalculator keysPerSecondCalculator);
void Attach(KeysPerSecondCalculator calculator);
}
public class RulesetInputManagerInputState<T> : InputState

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Timing;
using osu.Game.Rulesets.UI;
namespace osu.Game.Screens.Play.HUD.KPSCounter
namespace osu.Game.Screens.Play.HUD.KeysPerSecond
{
public class KeysPerSecondCalculator : Component
{

View File

@ -10,11 +10,11 @@ using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
// using osu.Game.Rulesets.UI;
using osu.Game.Skinning;
using osuTK;
// using osu.Game.Rulesets.UI;
namespace osu.Game.Screens.Play.HUD.KPSCounter
namespace osu.Game.Screens.Play.HUD.KeysPerSecond
{
public class KeysPerSecondCounter : RollingCounter<int>, ISkinnableDrawable
{

View File

@ -22,7 +22,7 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.HUD.KPSCounter;
using osu.Game.Screens.Play.HUD.KeysPerSecond;
using osu.Game.Skinning;
using osuTK;
@ -127,7 +127,6 @@ namespace osu.Game.Screens.Play
HoldToQuit = CreateHoldForMenuButton(),
}
},
keysPerSecondCalculator = new KeysPerSecondCalculator()
};
}
@ -265,7 +264,7 @@ namespace osu.Game.Screens.Play
protected virtual void BindDrawableRuleset(DrawableRuleset drawableRuleset)
{
(drawableRuleset as ICanAttachKeyCounter)?.Attach(KeyCounter);
(drawableRuleset as ICanAttachKpsCalculator)?.Attach(keysPerSecondCalculator);
(drawableRuleset as ICanAttachKeyCounter)?.Attach(keysPerSecondCalculator);
replayLoaded.BindTo(drawableRuleset.HasReplayLoaded);
}