mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 04:37:30 +09: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 leftBox;
|
||||||
private readonly Box rightBox;
|
private readonly Box rightBox;
|
||||||
|
|
||||||
|
private int tooltipDecimalDigits = 1;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The amount of decimal digits to display for <see cref="OsuSliderBar{T}"/>s with floating point values.
|
/// The amount of decimal digits to display for <see cref="OsuSliderBar{T}"/>s with floating point values.
|
||||||
/// </summary>
|
/// </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
|
public virtual string TooltipText
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user