mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
I guess this works...
This commit is contained in:
@ -10,8 +10,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
@ -25,20 +23,16 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private readonly Box leftBox;
|
||||
private readonly Box rightBox;
|
||||
|
||||
public Func<T, string> TooltipTextFunc { get; set; }
|
||||
|
||||
public string TooltipText
|
||||
public virtual string TooltipText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TooltipTextFunc != null) return TooltipTextFunc(Current);
|
||||
|
||||
var bindableDouble = CurrentNumber as BindableNumber<double>;
|
||||
if (bindableDouble != null)
|
||||
{
|
||||
if (bindableDouble.MaxValue == 1 && (bindableDouble.MinValue == 0 || bindableDouble.MinValue == -1))
|
||||
return bindableDouble.Value.ToString(@"P0");
|
||||
return bindableDouble.Value.ToString(@"n1", CultureInfo.InvariantCulture);
|
||||
return bindableDouble.Value.ToString(@"n1");
|
||||
}
|
||||
|
||||
var bindableInt = CurrentNumber as BindableNumber<int>;
|
||||
|
Reference in New Issue
Block a user