mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 09:23:06 +08:00
Fix nub naming in OsuCheckbox.cs and associated classes
This commit is contained in:
parent
76146b5c53
commit
091cc155d3
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user