mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Reorder and add xmldoc to KeyCounter
members
This commit is contained in:
parent
98f40b2679
commit
12af002c4d
@ -12,21 +12,35 @@ namespace osu.Game.Screens.Play.HUD
|
||||
/// </summary>
|
||||
public abstract partial class KeyCounter : Container
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="InputTrigger"/> which activates and deactivates this <see cref="KeyCounter"/>.
|
||||
/// </summary>
|
||||
public readonly InputTrigger Trigger;
|
||||
|
||||
private readonly Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
/// <summary>
|
||||
/// Whether the actions reported by <see cref="Trigger"/> should be counted.
|
||||
/// </summary>
|
||||
public Bindable<bool> IsCounting { get; } = new BindableBool(true);
|
||||
|
||||
private readonly Bindable<int> countPresses = new BindableInt
|
||||
{
|
||||
MinValue = 0
|
||||
};
|
||||
|
||||
public Bindable<bool> IsCounting { get; } = new BindableBool(true);
|
||||
|
||||
/// <summary>
|
||||
/// The current count of registered key presses.
|
||||
/// </summary>
|
||||
public IBindable<int> CountPresses => countPresses;
|
||||
|
||||
private readonly Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this <see cref="KeyCounter"/> is currently in the "activated" state because the associated key is currently pressed.
|
||||
/// </summary>
|
||||
protected readonly Bindable<bool> IsActive = new BindableBool();
|
||||
|
||||
protected KeyCounter(InputTrigger trigger)
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
@ -44,8 +58,6 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Name = trigger.Name;
|
||||
}
|
||||
|
||||
protected readonly Bindable<bool> IsActive = new BindableBool();
|
||||
|
||||
private void increment()
|
||||
{
|
||||
if (!IsCounting.Value)
|
||||
|
Loading…
Reference in New Issue
Block a user