mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 15:53:19 +08:00
Remove KPS acronym usage
This commit is contained in:
parent
0e1efbd865
commit
3c6461b9e4
@ -19,7 +19,7 @@ using osu.Game.Rulesets.Objects;
|
|||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Play.HUD.KPSCounter;
|
using osu.Game.Screens.Play.HUD.KeysPerSecond;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Gameplay
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
|
@ -30,7 +30,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
|||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Play.HUD.KPSCounter;
|
using osu.Game.Screens.Play.HUD.KeysPerSecond;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.UI
|
namespace osu.Game.Rulesets.UI
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// Displays an interactive ruleset gameplay instance.
|
/// Displays an interactive ruleset gameplay instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TObject">The type of HitObject contained by this DrawableRuleset.</typeparam>
|
/// <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
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
public override event Action<JudgementResult> NewResult;
|
public override event Action<JudgementResult> NewResult;
|
||||||
@ -341,7 +341,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
public void Attach(KeyCounterDisplay keyCounter) =>
|
public void Attach(KeyCounterDisplay keyCounter) =>
|
||||||
(KeyBindingInputManager as ICanAttachKeyCounter)?.Attach(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>
|
/// <summary>
|
||||||
/// Creates a key conversion input manager. An exception will be thrown if a valid <see cref="RulesetInputManager{T}"/> is not returned.
|
/// Creates a key conversion input manager. An exception will be thrown if a valid <see cref="RulesetInputManager{T}"/> is not returned.
|
||||||
|
@ -20,12 +20,12 @@ using osu.Game.Input.Bindings;
|
|||||||
using osu.Game.Input.Handlers;
|
using osu.Game.Input.Handlers;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
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;
|
using static osu.Game.Input.Handlers.ReplayInputHandler;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.UI
|
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
|
where T : struct
|
||||||
{
|
{
|
||||||
public readonly KeyBindingContainer<T> KeyBindingContainer;
|
public readonly KeyBindingContainer<T> KeyBindingContainer;
|
||||||
@ -187,15 +187,15 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
#endregion
|
#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();
|
var listener = new ActionListener();
|
||||||
|
|
||||||
KeyBindingContainer.Add(listener);
|
KeyBindingContainer.Add(listener);
|
||||||
|
|
||||||
kps.Listener = listener;
|
calculator.Listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ActionListener : KeysPerSecondCalculator.InputListener, IKeyBindingHandler<T>
|
public class ActionListener : KeysPerSecondCalculator.InputListener, IKeyBindingHandler<T>
|
||||||
@ -257,11 +257,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
public interface ICanAttachKeyCounter
|
public interface ICanAttachKeyCounter
|
||||||
{
|
{
|
||||||
void Attach(KeyCounterDisplay keyCounter);
|
void Attach(KeyCounterDisplay keyCounter);
|
||||||
}
|
void Attach(KeysPerSecondCalculator calculator);
|
||||||
|
|
||||||
public interface ICanAttachKpsCalculator
|
|
||||||
{
|
|
||||||
void Attach(KeysPerSecondCalculator keysPerSecondCalculator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RulesetInputManagerInputState<T> : InputState
|
public class RulesetInputManagerInputState<T> : InputState
|
||||||
|
@ -9,7 +9,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.HUD.KPSCounter
|
namespace osu.Game.Screens.Play.HUD.KeysPerSecond
|
||||||
{
|
{
|
||||||
public class KeysPerSecondCalculator : Component
|
public class KeysPerSecondCalculator : Component
|
||||||
{
|
{
|
@ -10,11 +10,11 @@ using osu.Framework.Localisation;
|
|||||||
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.UI;
|
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
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
|
public class KeysPerSecondCounter : RollingCounter<int>, ISkinnableDrawable
|
||||||
{
|
{
|
@ -22,7 +22,7 @@ using osu.Game.Rulesets.Mods;
|
|||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Screens.Play.HUD;
|
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 osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -127,7 +127,6 @@ namespace osu.Game.Screens.Play
|
|||||||
HoldToQuit = CreateHoldForMenuButton(),
|
HoldToQuit = CreateHoldForMenuButton(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
keysPerSecondCalculator = new KeysPerSecondCalculator()
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +264,7 @@ namespace osu.Game.Screens.Play
|
|||||||
protected virtual void BindDrawableRuleset(DrawableRuleset drawableRuleset)
|
protected virtual void BindDrawableRuleset(DrawableRuleset drawableRuleset)
|
||||||
{
|
{
|
||||||
(drawableRuleset as ICanAttachKeyCounter)?.Attach(KeyCounter);
|
(drawableRuleset as ICanAttachKeyCounter)?.Attach(KeyCounter);
|
||||||
(drawableRuleset as ICanAttachKpsCalculator)?.Attach(keysPerSecondCalculator);
|
(drawableRuleset as ICanAttachKeyCounter)?.Attach(keysPerSecondCalculator);
|
||||||
|
|
||||||
replayLoaded.BindTo(drawableRuleset.HasReplayLoaded);
|
replayLoaded.BindTo(drawableRuleset.HasReplayLoaded);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user