mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 12:42:54 +08:00
Don't call Container.Add within KeyCounterCollection.Reset.
This commit is contained in:
parent
0a10bf9a51
commit
36bb4a3988
@ -19,17 +19,22 @@ namespace osu.Desktop.Tests
|
|||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
KeyCounterCollection kc = new KeyCounterCollection
|
Children = new[]
|
||||||
|
{
|
||||||
|
new KeyCounterCollection
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
IsCounting = true
|
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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user