mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
refactor: remove detachment logic
No real use case, cleaning up the diff
This commit is contained in:
parent
7e70598773
commit
b4cbcb210e
@ -330,9 +330,6 @@ namespace osu.Game.Rulesets.UI
|
||||
public void Attach(IAttachableSkinComponent skinComponent) =>
|
||||
(KeyBindingInputManager as ICanAttachHUDPieces)?.Attach(skinComponent);
|
||||
|
||||
public void Detach(IAttachableSkinComponent skinComponent) =>
|
||||
(KeyBindingInputManager as ICanAttachHUDPieces)?.Detach(skinComponent);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a key conversion input manager. An exception will be thrown if a valid <see cref="RulesetInputManager{T}"/> is not returned.
|
||||
/// </summary>
|
||||
|
@ -165,7 +165,8 @@ namespace osu.Game.Rulesets.UI
|
||||
switch (skinComponent)
|
||||
{
|
||||
case KeyCounterController keyCounterDisplay:
|
||||
attachKeyCounter(keyCounterDisplay); break;
|
||||
attachKeyCounter(keyCounterDisplay);
|
||||
break;
|
||||
|
||||
case ClicksPerSecondCalculator clicksPerSecondCalculator:
|
||||
attachClicksPerSecond(clicksPerSecondCalculator);
|
||||
@ -173,20 +174,6 @@ namespace osu.Game.Rulesets.UI
|
||||
}
|
||||
}
|
||||
|
||||
public void Detach(IAttachableSkinComponent skinComponent)
|
||||
{
|
||||
switch (skinComponent)
|
||||
{
|
||||
case KeyCounterController keyCounterDisplay:
|
||||
detachKeyCounter(keyCounterDisplay);
|
||||
break;
|
||||
|
||||
case ClicksPerSecondCalculator clicksPerSecondCalculator:
|
||||
detachClicksPerSecond(clicksPerSecondCalculator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Key Counter Attachment
|
||||
@ -205,11 +192,6 @@ namespace osu.Game.Rulesets.UI
|
||||
.Select(action => new KeyCounterActionTrigger<T>(action)));
|
||||
}
|
||||
|
||||
private void detachKeyCounter(KeyCounterController keyCounter)
|
||||
{
|
||||
keyCounter.ClearReceptor();
|
||||
}
|
||||
|
||||
private partial class ActionReceptor : KeyCounterController.Receptor, IKeyBindingHandler<T>
|
||||
{
|
||||
public ActionReceptor(KeyCounterController target)
|
||||
@ -239,10 +221,6 @@ namespace osu.Game.Rulesets.UI
|
||||
KeyBindingContainer.Add(listener);
|
||||
}
|
||||
|
||||
private void detachClicksPerSecond(ClicksPerSecondCalculator calculator)
|
||||
{
|
||||
}
|
||||
|
||||
private partial class ActionListener : Component, IKeyBindingHandler<T>
|
||||
{
|
||||
private readonly ClicksPerSecondCalculator calculator;
|
||||
@ -306,7 +284,6 @@ namespace osu.Game.Rulesets.UI
|
||||
public interface ICanAttachHUDPieces
|
||||
{
|
||||
void Attach(IAttachableSkinComponent component);
|
||||
void Detach(IAttachableSkinComponent component);
|
||||
}
|
||||
|
||||
public interface IAttachableSkinComponent
|
||||
|
Loading…
Reference in New Issue
Block a user