1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Don't call Container.Add within KeyCounterCollection.Reset.

This commit is contained in:
Thomas Müller 2016-10-09 11:55:38 +02:00 committed by Dean Herbert
parent 0a10bf9a51
commit 36bb4a3988

View File

@ -19,17 +19,22 @@ namespace osu.Desktop.Tests
{
base.Reset();
KeyCounterCollection kc = new KeyCounterCollection
Children = new[]
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
IsCounting = true
new KeyCounterCollection
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
IsCounting = true,
Counters = new KeyCounter[]
{
new KeyCounterKeyboard(@"Z", Key.Z),
new KeyCounterKeyboard(@"X", Key.X),
new KeyCounterMouse(@"M1", MouseButton.Left),
new KeyCounterMouse(@"M2", MouseButton.Right),
},
},
};
Add(kc);
kc.AddKey(new KeyCounterKeyboard(@"Z", Key.Z));
kc.AddKey(new KeyCounterKeyboard(@"X", Key.X));
kc.AddKey(new KeyCounterMouse(@"M1", MouseButton.Left));
kc.AddKey(new KeyCounterMouse(@"M2", MouseButton.Right));
}
}
}