mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 07:23:14 +08:00
Rename variable for potential future expansion
This commit is contained in:
parent
4a1621bf98
commit
f699a34c77
@ -24,7 +24,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Child = new PasswordMaskChar(CalculatedTextSize),
|
Child = new PasswordMaskChar(CalculatedTextSize),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override bool AllowUpperCaseSamples => false;
|
protected override bool AllowUniqueCharacterSamples => false;
|
||||||
|
|
||||||
protected override bool AllowClipboardExport => false;
|
protected override bool AllowClipboardExport => false;
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
private SampleChannel caretMovedSample;
|
private SampleChannel caretMovedSample;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to allow playing a different sample when inserting upper case text.
|
/// Whether to allow playing a different samples based on the type of character.
|
||||||
/// If set to false, same sample will be played for both letter cases.
|
/// If set to false, the same sample will be used for all characters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual bool AllowUpperCaseSamples => true;
|
protected virtual bool AllowUniqueCharacterSamples => true;
|
||||||
|
|
||||||
protected override float LeftRightPadding => 10;
|
protected override float LeftRightPadding => 10;
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
base.OnTextAdded(added);
|
base.OnTextAdded(added);
|
||||||
|
|
||||||
if (added.Any(char.IsUpper) && AllowUpperCaseSamples)
|
if (added.Any(char.IsUpper) && AllowUniqueCharacterSamples)
|
||||||
capsTextAddedSample?.Play();
|
capsTextAddedSample?.Play();
|
||||||
else
|
else
|
||||||
textAddedSamples[RNG.Next(0, 3)]?.Play();
|
textAddedSamples[RNG.Next(0, 3)]?.Play();
|
||||||
|
Loading…
Reference in New Issue
Block a user