1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07: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));
}
}
}