mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 03:03:21 +08:00
Rename NormalNub.cs to RoundedNub.cs
This commit is contained in:
parent
091cc155d3
commit
7c5a65bdb7
@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
LowerBound = customStart,
|
||||
UpperBound = customEnd,
|
||||
TooltipSuffix = "suffix",
|
||||
NubWidth = NormalNub.HEIGHT * 2,
|
||||
NubWidth = RoundedNub.HEIGHT * 2,
|
||||
DefaultStringLowerBound = "Start",
|
||||
DefaultStringUpperBound = "End",
|
||||
MinRange = 10
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public partial class NormalSliderBar<T> : OsuSliderBar<T>
|
||||
where T : struct, IEquatable<T>, IComparable<T>, IConvertible
|
||||
{
|
||||
protected readonly NormalNub Nub;
|
||||
protected readonly RoundedNub Nub;
|
||||
protected readonly Box LeftBox;
|
||||
protected readonly Box RightBox;
|
||||
private readonly Container nubContainer;
|
||||
@ -50,8 +50,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public NormalSliderBar()
|
||||
{
|
||||
Height = NormalNub.HEIGHT;
|
||||
RangePadding = NormalNub.EXPANDED_SIZE / 2;
|
||||
Height = RoundedNub.HEIGHT;
|
||||
RangePadding = RoundedNub.EXPANDED_SIZE / 2;
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -93,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
nubContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = Nub = new NormalNub
|
||||
Child = Nub = new RoundedNub
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
RelativePositionAxes = Axes.X,
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
protected readonly NormalNub Nub;
|
||||
protected readonly RoundedNub Nub;
|
||||
|
||||
protected readonly OsuTextFlowContainer LabelTextFlowContainer;
|
||||
private Sample sampleChecked;
|
||||
@ -61,7 +61,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
Nub = new NormalNub(),
|
||||
Nub = new RoundedNub(),
|
||||
new HoverSounds()
|
||||
};
|
||||
|
||||
@ -70,14 +70,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Nub.Anchor = Anchor.CentreRight;
|
||||
Nub.Origin = Anchor.CentreRight;
|
||||
Nub.Margin = new MarginPadding { Right = nub_padding };
|
||||
LabelTextFlowContainer.Padding = new MarginPadding { Right = NormalNub.EXPANDED_SIZE + nub_padding * 2 };
|
||||
LabelTextFlowContainer.Padding = new MarginPadding { Right = RoundedNub.EXPANDED_SIZE + nub_padding * 2 };
|
||||
}
|
||||
else
|
||||
{
|
||||
Nub.Anchor = Anchor.CentreLeft;
|
||||
Nub.Origin = Anchor.CentreLeft;
|
||||
Nub.Margin = new MarginPadding { Left = nub_padding };
|
||||
LabelTextFlowContainer.Padding = new MarginPadding { Left = NormalNub.EXPANDED_SIZE + nub_padding * 2 };
|
||||
LabelTextFlowContainer.Padding = new MarginPadding { Left = RoundedNub.EXPANDED_SIZE + nub_padding * 2 };
|
||||
}
|
||||
|
||||
Nub.Current.BindTo(Current);
|
||||
|
@ -163,7 +163,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public string? DefaultString;
|
||||
public LocalisableString? DefaultTooltip;
|
||||
public string? TooltipSuffix;
|
||||
public float NubWidth { get; set; } = NormalNub.HEIGHT;
|
||||
public float NubWidth { get; set; } = RoundedNub.HEIGHT;
|
||||
|
||||
public override LocalisableString TooltipText =>
|
||||
(Current.IsDefault ? DefaultTooltip : Current.Value.ToString($@"0.## {TooltipSuffix}")) ?? Current.Value.ToString($@"0.## {TooltipSuffix}");
|
||||
|
@ -7,13 +7,13 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public partial class NormalNub : Nub
|
||||
public partial class RoundedNub : Nub
|
||||
{
|
||||
public const float HEIGHT = 15;
|
||||
|
||||
public const float EXPANDED_SIZE = 50;
|
||||
|
||||
public NormalNub()
|
||||
public RoundedNub()
|
||||
{
|
||||
Size = new Vector2(EXPANDED_SIZE, HEIGHT);
|
||||
}
|
Loading…
Reference in New Issue
Block a user