1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Fix nub naming in OsuCheckbox.cs and associated classes

This commit is contained in:
mk56-spn 2023-01-26 16:10:02 +01:00
parent 76146b5c53
commit 091cc155d3
4 changed files with 21 additions and 21 deletions

View File

@ -41,7 +41,7 @@ namespace osu.Game.Graphics.UserInterface
}
}
protected readonly NormalNub NormalNub;
protected readonly NormalNub Nub;
protected readonly OsuTextFlowContainer LabelTextFlowContainer;
private Sample sampleChecked;
@ -61,28 +61,28 @@ namespace osu.Game.Graphics.UserInterface
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
},
NormalNub = new NormalNub(),
Nub = new NormalNub(),
new HoverSounds()
};
if (nubOnRight)
{
NormalNub.Anchor = Anchor.CentreRight;
NormalNub.Origin = Anchor.CentreRight;
NormalNub.Margin = new MarginPadding { Right = nub_padding };
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 };
}
else
{
NormalNub.Anchor = Anchor.CentreLeft;
NormalNub.Origin = Anchor.CentreLeft;
NormalNub.Margin = new MarginPadding { Left = nub_padding };
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 };
}
NormalNub.Current.BindTo(Current);
Nub.Current.BindTo(Current);
Current.DisabledChanged += disabled => LabelTextFlowContainer.Alpha = NormalNub.Alpha = disabled ? 0.3f : 1;
Current.DisabledChanged += disabled => LabelTextFlowContainer.Alpha = Nub.Alpha = disabled ? 0.3f : 1;
}
/// <summary>
@ -101,13 +101,13 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnHover(HoverEvent e)
{
NormalNub.Glowing = true;
Nub.Glowing = true;
return base.OnHover(e);
}
protected override void OnHoverLost(HoverLostEvent e)
{
NormalNub.Glowing = false;
Nub.Glowing = false;
base.OnHoverLost(e);
}

View File

@ -30,9 +30,9 @@ namespace osu.Game.Graphics.UserInterfaceV2
if (overlayColourProvider != null)
return;
NormalNub.AccentColour = colours.GreySeaFoamLighter;
NormalNub.GlowingAccentColour = Color4.White;
NormalNub.GlowColour = Color4.White;
Nub.AccentColour = colours.GreySeaFoamLighter;
Nub.GlowingAccentColour = Color4.White;
Nub.GlowColour = Color4.White;
}
}
}

View File

@ -267,9 +267,9 @@ namespace osu.Game.Overlays.Mods
private void updateState()
{
NormalNub.AccentColour = AccentColour;
NormalNub.GlowingAccentColour = AccentHoverColour;
NormalNub.GlowColour = AccentHoverColour.Opacity(0.2f);
Nub.AccentColour = AccentColour;
Nub.GlowingAccentColour = AccentHoverColour;
Nub.GlowColour = AccentHoverColour.Opacity(0.2f);
}
protected override void OnUserChange(bool value)

View File

@ -18,9 +18,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
NormalNub.AccentColour = colours.Yellow;
NormalNub.GlowingAccentColour = colours.YellowLighter;
NormalNub.GlowColour = colours.YellowDark;
Nub.AccentColour = colours.Yellow;
Nub.GlowingAccentColour = colours.YellowLighter;
Nub.GlowColour = colours.YellowDark;
}
}
}