mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +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;
|
protected readonly OsuTextFlowContainer LabelTextFlowContainer;
|
||||||
private Sample sampleChecked;
|
private Sample sampleChecked;
|
||||||
@ -61,28 +61,28 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
NormalNub = new NormalNub(),
|
Nub = new NormalNub(),
|
||||||
new HoverSounds()
|
new HoverSounds()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (nubOnRight)
|
if (nubOnRight)
|
||||||
{
|
{
|
||||||
NormalNub.Anchor = Anchor.CentreRight;
|
Nub.Anchor = Anchor.CentreRight;
|
||||||
NormalNub.Origin = Anchor.CentreRight;
|
Nub.Origin = Anchor.CentreRight;
|
||||||
NormalNub.Margin = new MarginPadding { Right = nub_padding };
|
Nub.Margin = new MarginPadding { Right = nub_padding };
|
||||||
LabelTextFlowContainer.Padding = new MarginPadding { Right = NormalNub.EXPANDED_SIZE + nub_padding * 2 };
|
LabelTextFlowContainer.Padding = new MarginPadding { Right = NormalNub.EXPANDED_SIZE + nub_padding * 2 };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NormalNub.Anchor = Anchor.CentreLeft;
|
Nub.Anchor = Anchor.CentreLeft;
|
||||||
NormalNub.Origin = Anchor.CentreLeft;
|
Nub.Origin = Anchor.CentreLeft;
|
||||||
NormalNub.Margin = new MarginPadding { Left = nub_padding };
|
Nub.Margin = new MarginPadding { Left = nub_padding };
|
||||||
LabelTextFlowContainer.Padding = new MarginPadding { Left = NormalNub.EXPANDED_SIZE + nub_padding * 2 };
|
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>
|
/// <summary>
|
||||||
@ -101,13 +101,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
NormalNub.Glowing = true;
|
Nub.Glowing = true;
|
||||||
return base.OnHover(e);
|
return base.OnHover(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
NormalNub.Glowing = false;
|
Nub.Glowing = false;
|
||||||
base.OnHoverLost(e);
|
base.OnHoverLost(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
if (overlayColourProvider != null)
|
if (overlayColourProvider != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NormalNub.AccentColour = colours.GreySeaFoamLighter;
|
Nub.AccentColour = colours.GreySeaFoamLighter;
|
||||||
NormalNub.GlowingAccentColour = Color4.White;
|
Nub.GlowingAccentColour = Color4.White;
|
||||||
NormalNub.GlowColour = Color4.White;
|
Nub.GlowColour = Color4.White;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,9 +267,9 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
NormalNub.AccentColour = AccentColour;
|
Nub.AccentColour = AccentColour;
|
||||||
NormalNub.GlowingAccentColour = AccentHoverColour;
|
Nub.GlowingAccentColour = AccentHoverColour;
|
||||||
NormalNub.GlowColour = AccentHoverColour.Opacity(0.2f);
|
Nub.GlowColour = AccentHoverColour.Opacity(0.2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnUserChange(bool value)
|
protected override void OnUserChange(bool value)
|
||||||
|
@ -18,9 +18,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
NormalNub.AccentColour = colours.Yellow;
|
Nub.AccentColour = colours.Yellow;
|
||||||
NormalNub.GlowingAccentColour = colours.YellowLighter;
|
Nub.GlowingAccentColour = colours.YellowLighter;
|
||||||
NormalNub.GlowColour = colours.YellowDark;
|
Nub.GlowColour = colours.YellowDark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user