1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 12:07:23 +08:00

Trigger a value changed event when the number of digits changes

This commit is contained in:
smoogipoo 2018-01-02 16:12:48 +09:00
parent eaa2a007e7
commit b84f83cf16

View File

@ -28,10 +28,26 @@ namespace osu.Game.Graphics.UserInterface
private readonly Box leftBox;
private readonly Box rightBox;
private int tooltipDecimalDigits = 1;
/// <summary>
/// The amount of decimal digits to display for <see cref="OsuSliderBar{T}"/>s with floating point values.
/// </summary>
public int TooltipDecimalDigits = 1;
public int TooltipDecimalDigits
{
get => tooltipDecimalDigits;
set
{
if (tooltipDecimalDigits == value)
return;
tooltipDecimalDigits = value;
if (IsLoaded)
{
// Some users may want to see the updated ToolTipText
Current.TriggerChange();
}
}
}
public virtual string TooltipText
{