mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 18:47:27 +08:00
Rename Add
/AddRange
methods as they are no longer conflicting with Container
This commit is contained in:
parent
9e444af380
commit
5f9b13a775
@ -266,7 +266,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
hudOverlay = new HUDOverlay(null, Array.Empty<Mod>());
|
||||
|
||||
// Add any key just to display the key counter visually.
|
||||
hudOverlay.KeyCounter.AddTrigger(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
hudOverlay.KeyCounter.Add(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
|
||||
scoreProcessor.Combo.Value = 1;
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
Anchor = Anchor.Centre,
|
||||
};
|
||||
|
||||
kc.AddTriggerRange(new InputTrigger[]
|
||||
kc.AddRange(new InputTrigger[]
|
||||
{
|
||||
new KeyCounterKeyboardTrigger(Key.X),
|
||||
new KeyCounterKeyboardTrigger(Key.X),
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep("Add random", () =>
|
||||
{
|
||||
Key key = (Key)((int)Key.A + RNG.Next(26));
|
||||
kc.AddTrigger(new KeyCounterKeyboardTrigger(key));
|
||||
kc.Add(new KeyCounterKeyboardTrigger(key));
|
||||
});
|
||||
|
||||
Key testKey = ((KeyCounterKeyboardTrigger)kc.Counters.First().Trigger).Key;
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
};
|
||||
|
||||
// Add any key just to display the key counter visually.
|
||||
hudOverlay.KeyCounter.AddTrigger(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
hudOverlay.KeyCounter.Add(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
scoreProcessor.Combo.Value = 1;
|
||||
|
||||
return new Container
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
hudOverlay = new HUDOverlay(null, Array.Empty<Mod>());
|
||||
|
||||
// Add any key just to display the key counter visually.
|
||||
hudOverlay.KeyCounter.AddTrigger(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
hudOverlay.KeyCounter.Add(new KeyCounterKeyboardTrigger(Key.Space));
|
||||
|
||||
action?.Invoke(hudOverlay);
|
||||
|
||||
|
@ -162,7 +162,7 @@ namespace osu.Game.Rulesets.UI
|
||||
KeyBindingContainer.Add(receptor);
|
||||
|
||||
keyCounter.SetReceptor(receptor);
|
||||
keyCounter.AddTriggerRange(KeyBindingContainer.DefaultKeyBindings
|
||||
keyCounter.AddRange(KeyBindingContainer.DefaultKeyBindings
|
||||
.Select(b => b.GetAction<T>())
|
||||
.Distinct()
|
||||
.OrderBy(action => action)
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Size = keyFlow.Size;
|
||||
}
|
||||
|
||||
public override void AddTrigger(InputTrigger trigger)
|
||||
public override void Add(InputTrigger trigger) =>
|
||||
keyFlow.Add(new DefaultKeyCounter(trigger)
|
||||
{
|
||||
FadeTime = key_fade_time,
|
||||
|
@ -51,16 +51,14 @@ namespace osu.Game.Screens.Play.HUD
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new <see cref="KeyCounter"/> to this <see cref="KeyCounterDisplay"/>.
|
||||
/// Add a <see cref="InputTrigger"/> to this display.
|
||||
/// </summary>
|
||||
/// <param name="trigger">The <see cref="InputTrigger"/> the resulting <see cref="KeyCounter"/> will react to.</param>
|
||||
public abstract void AddTrigger(InputTrigger trigger);
|
||||
public abstract void Add(InputTrigger trigger);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a range of new <see cref="KeyCounter"/>s to this <see cref="KeyCounterDisplay"/>.
|
||||
/// Add a range of <see cref="InputTrigger"/> to this display.
|
||||
/// </summary>
|
||||
/// <param name="triggers">The <see cref="InputTrigger"/>s the resulting <see cref="KeyCounter"/>s will react to.</param>
|
||||
public void AddTriggerRange(IEnumerable<InputTrigger> triggers) => triggers.ForEach(AddTrigger);
|
||||
public void AddRange(IEnumerable<InputTrigger> triggers) => triggers.ForEach(Add);
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
|
Loading…
Reference in New Issue
Block a user