mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 08:23:20 +08:00
Trigger a value changed event when the number of digits changes
This commit is contained in:
parent
eaa2a007e7
commit
b84f83cf16
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user