From 091cc155d33ba19b4f99f7c2243c683773f38065 Mon Sep 17 00:00:00 2001 From: mk56-spn Date: Thu, 26 Jan 2023 16:10:02 +0100 Subject: [PATCH] Fix nub naming in OsuCheckbox.cs and associated classes --- .../Graphics/UserInterface/OsuCheckbox.cs | 24 +++++++++---------- .../OsuDirectorySelectorHiddenToggle.cs | 6 ++--- osu.Game/Overlays/Mods/ModColumn.cs | 6 ++--- .../Play/PlayerSettings/PlayerCheckbox.cs | 6 ++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index 982706f87b..877493dd5c 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -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; } /// @@ -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); } diff --git a/osu.Game/Graphics/UserInterfaceV2/OsuDirectorySelectorHiddenToggle.cs b/osu.Game/Graphics/UserInterfaceV2/OsuDirectorySelectorHiddenToggle.cs index 79f72495c8..7665ed507f 100644 --- a/osu.Game/Graphics/UserInterfaceV2/OsuDirectorySelectorHiddenToggle.cs +++ b/osu.Game/Graphics/UserInterfaceV2/OsuDirectorySelectorHiddenToggle.cs @@ -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; } } } diff --git a/osu.Game/Overlays/Mods/ModColumn.cs b/osu.Game/Overlays/Mods/ModColumn.cs index 97a766259a..5d9f616e5f 100644 --- a/osu.Game/Overlays/Mods/ModColumn.cs +++ b/osu.Game/Overlays/Mods/ModColumn.cs @@ -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) diff --git a/osu.Game/Screens/Play/PlayerSettings/PlayerCheckbox.cs b/osu.Game/Screens/Play/PlayerSettings/PlayerCheckbox.cs index 960904282d..49c9cbf385 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlayerCheckbox.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlayerCheckbox.cs @@ -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; } } }