From 3d402d9e788c1406eb997344887dc7ff4eb36da0 Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Sun, 22 Aug 2021 10:13:34 +0800 Subject: [PATCH 1/9] List incompatible mods in tooltip of mod button --- osu.Game/Overlays/Mods/ModButton.cs | 6 +- osu.Game/Overlays/Mods/ModButtonTooltip.cs | 145 +++++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 osu.Game/Overlays/Mods/ModButtonTooltip.cs diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 572ff0d1aa..88cc706766 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Mods /// /// Represents a clickable button which can cycle through one of more mods. /// - public class ModButton : ModButtonEmpty, IHasTooltip + public class ModButton : ModButtonEmpty, IHasCustomTooltip { private ModIcon foregroundIcon; private ModIcon backgroundIcon; @@ -308,5 +308,9 @@ namespace osu.Game.Overlays.Mods Mod = mod; } + + public ITooltip GetCustomTooltip() => new ModButtonTooltip(); + + public object TooltipContent => SelectedMod ?? Mods[0]; } } diff --git a/osu.Game/Overlays/Mods/ModButtonTooltip.cs b/osu.Game/Overlays/Mods/ModButtonTooltip.cs new file mode 100644 index 0000000000..2a3160e779 --- /dev/null +++ b/osu.Game/Overlays/Mods/ModButtonTooltip.cs @@ -0,0 +1,145 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System.Collections.Generic; +using System.Linq; +using osu.Framework.Allocation; +using osu.Framework.Bindables; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Cursor; +using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; +using osu.Game.Rulesets; +using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.UI; +using osu.Game.Screens.Play.HUD; +using osuTK; + +namespace osu.Game.Overlays.Mods +{ + public class ModButtonTooltip : VisibilityContainer, ITooltip + { + private readonly OsuSpriteText descriptionText; + private readonly Box background; + private readonly OsuSpriteText incompatibleText; + + private readonly Bindable> incompatibleMods = new Bindable>(); + + [Resolved] + private Bindable ruleset { get; set; } + + public ModButtonTooltip() + { + AutoSizeAxes = Axes.Both; + Masking = true; + CornerRadius = 5; + + Children = new Drawable[] + { + background = new Box + { + RelativeSizeAxes = Axes.Both + }, + new FillFlowContainer + { + AutoSizeAxes = Axes.Both, + Direction = FillDirection.Vertical, + Padding = new MarginPadding { Left = 10, Right = 10, Top = 5, Bottom = 5 }, + Children = new Drawable[] + { + descriptionText = new OsuSpriteText + { + Font = OsuFont.GetFont(weight: FontWeight.Regular), + Margin = new MarginPadding { Bottom = 5 } + }, + incompatibleText = new OsuSpriteText + { + Font = OsuFont.GetFont(weight: FontWeight.Regular), + Text = "Incompatible with:" + }, + new ModDisplay + { + Current = incompatibleMods, + ExpansionMode = ExpansionMode.AlwaysExpanded, + Scale = new Vector2(0.7f) + } + } + }, + }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + background.Colour = colours.Gray3; + descriptionText.Colour = colours.BlueLighter; + incompatibleText.Colour = colours.BlueLight; + } + + protected override void PopIn() => this.FadeIn(200, Easing.OutQuint); + protected override void PopOut() => this.FadeOut(200, Easing.OutQuint); + + private Drawable getModItem(Mod mod) + { + return new FillFlowContainer + { + Anchor = Anchor.CentreLeft, + Origin = Anchor.CentreLeft, + AutoSizeAxes = Axes.Both, + Direction = FillDirection.Horizontal, + Children = new Drawable[] + { + new ModIcon(mod, false) + { + Anchor = Anchor.CentreLeft, + Origin = Anchor.CentreLeft, + AutoSizeAxes = Axes.Both, + Scale = new Vector2(0.4f) + }, + new OsuSpriteText + { + Anchor = Anchor.CentreLeft, + Origin = Anchor.CentreLeft, + Margin = new MarginPadding { Left = 5 }, + Font = OsuFont.GetFont(weight: FontWeight.Regular), + Text = mod.Name, + }, + } + }; + } + + private string lastMod; + + public bool SetContent(object content) + { + if (!(content is Mod mod)) + return false; + + if (mod.Acronym == lastMod) return true; + + lastMod = mod.Acronym; + + descriptionText.Text = mod.Description; + + var incompatibleTypes = mod.IncompatibleMods; + + var allMods = ruleset.Value.CreateInstance().GetAllMods(); + + incompatibleMods.Value = allMods.Where(m => incompatibleTypes.Any(t => t.IsInstanceOfType(m))).ToList(); + + if (!incompatibleMods.Value.Any()) + { + incompatibleText.Text = "Compatible with all mods"; + return true; + } + + incompatibleText.Text = "Incompatible with:"; + + return true; + } + + public void Move(Vector2 pos) => Position = pos; + } +} From ef6faf04be40955911b288d2b9b57b8cf21c7a10 Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Sun, 22 Aug 2021 10:22:18 +0800 Subject: [PATCH 2/9] Use FirstOrDefault in TooltipContent --- osu.Game/Overlays/Mods/ModButton.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 88cc706766..9ad867c58a 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -311,6 +311,6 @@ namespace osu.Game.Overlays.Mods public ITooltip GetCustomTooltip() => new ModButtonTooltip(); - public object TooltipContent => SelectedMod ?? Mods[0]; + public object TooltipContent => SelectedMod ?? Mods.FirstOrDefault(); } } From e213562b2a908b30a19b17e6182a08d9aa74c653 Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Sun, 22 Aug 2021 11:01:17 +0800 Subject: [PATCH 3/9] Add a red tint on mods incompatible with the current selection --- osu.Game/Overlays/Mods/ModButton.cs | 38 +++++++++++++++++++++- osu.Game/Overlays/Mods/ModButtonTooltip.cs | 2 +- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 9ad867c58a..359d1a7981 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -11,12 +11,16 @@ using osu.Game.Graphics.Sprites; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.UI; using System; +using System.Collections.Generic; using System.Linq; +using osu.Framework.Allocation; +using osu.Framework.Bindables; using osu.Framework.Graphics.Cursor; using osu.Framework.Input.Events; using osu.Framework.Localisation; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; +using osu.Game.Utils; namespace osu.Game.Overlays.Mods { @@ -43,6 +47,9 @@ namespace osu.Game.Overlays.Mods // A selected index of -1 means not selected. private int selectedIndex = -1; + [Resolved] + private Bindable> globalSelectedMods { get; set; } + /// /// Change the selected mod index of this button. /// @@ -236,7 +243,28 @@ namespace osu.Game.Overlays.Mods backgroundIcon.Mod = foregroundIcon.Mod; foregroundIcon.Mod = mod; text.Text = mod.Name; - Colour = mod.HasImplementation ? Color4.White : Color4.Gray; + updateColour(mod); + } + + private Colour4 lightRed; + private Colour4 darkRed; + + private void updateColour(Mod mod) + { + var baseColour = mod.HasImplementation ? Color4.White : Color4.Gray; + + if (globalSelectedMods != null) + { + if (!globalSelectedMods.Value.Contains(mod)) + { + if (!ModUtils.CheckCompatibleSet(globalSelectedMods.Value.Concat(new[] { mod }))) + { + baseColour = mod.HasImplementation ? lightRed : darkRed; + } + } + } + + Colour = baseColour; } private void createIcons() @@ -309,6 +337,14 @@ namespace osu.Game.Overlays.Mods Mod = mod; } + [BackgroundDependencyLoader] + private void load(OsuColour colour) + { + lightRed = colour.RedLight; + darkRed = colour.RedDark; + globalSelectedMods.BindValueChanged(_ => updateColour(SelectedMod ?? Mods.FirstOrDefault()), true); + } + public ITooltip GetCustomTooltip() => new ModButtonTooltip(); public object TooltipContent => SelectedMod ?? Mods.FirstOrDefault(); diff --git a/osu.Game/Overlays/Mods/ModButtonTooltip.cs b/osu.Game/Overlays/Mods/ModButtonTooltip.cs index 2a3160e779..3383ad2d99 100644 --- a/osu.Game/Overlays/Mods/ModButtonTooltip.cs +++ b/osu.Game/Overlays/Mods/ModButtonTooltip.cs @@ -127,7 +127,7 @@ namespace osu.Game.Overlays.Mods var allMods = ruleset.Value.CreateInstance().GetAllMods(); - incompatibleMods.Value = allMods.Where(m => incompatibleTypes.Any(t => t.IsInstanceOfType(m))).ToList(); + incompatibleMods.Value = allMods.Where(m => m.GetType() != mod.GetType() && incompatibleTypes.Any(t => t.IsInstanceOfType(m))).ToList(); if (!incompatibleMods.Value.Any()) { From 0bbddd297c9bc0ea1201005d761cf7b3f78ead0b Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Sun, 22 Aug 2021 11:05:53 +0800 Subject: [PATCH 4/9] Remove unused code --- osu.Game/Overlays/Mods/ModButtonTooltip.cs | 30 ---------------------- 1 file changed, 30 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModButtonTooltip.cs b/osu.Game/Overlays/Mods/ModButtonTooltip.cs index 3383ad2d99..1b889281f0 100644 --- a/osu.Game/Overlays/Mods/ModButtonTooltip.cs +++ b/osu.Game/Overlays/Mods/ModButtonTooltip.cs @@ -13,7 +13,6 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Rulesets; using osu.Game.Rulesets.Mods; -using osu.Game.Rulesets.UI; using osu.Game.Screens.Play.HUD; using osuTK; @@ -81,35 +80,6 @@ namespace osu.Game.Overlays.Mods protected override void PopIn() => this.FadeIn(200, Easing.OutQuint); protected override void PopOut() => this.FadeOut(200, Easing.OutQuint); - private Drawable getModItem(Mod mod) - { - return new FillFlowContainer - { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - AutoSizeAxes = Axes.Both, - Direction = FillDirection.Horizontal, - Children = new Drawable[] - { - new ModIcon(mod, false) - { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - AutoSizeAxes = Axes.Both, - Scale = new Vector2(0.4f) - }, - new OsuSpriteText - { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - Margin = new MarginPadding { Left = 5 }, - Font = OsuFont.GetFont(weight: FontWeight.Regular), - Text = mod.Name, - }, - } - }; - } - private string lastMod; public bool SetContent(object content) From 6e3d05c7ce5c42cd932ddab403c6f1654caffe2d Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Tue, 24 Aug 2021 09:42:53 +0800 Subject: [PATCH 5/9] Display an icon to signify incompatibility instead of a red tint --- osu.Game/Overlays/Mods/ModButton.cs | 43 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 359d1a7981..f4233c65cb 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -33,6 +33,7 @@ namespace osu.Game.Overlays.Mods private ModIcon backgroundIcon; private readonly SpriteText text; private readonly Container iconsContainer; + private readonly SpriteIcon incompatibleIcon; /// /// Fired when the selection changes. @@ -243,28 +244,25 @@ namespace osu.Game.Overlays.Mods backgroundIcon.Mod = foregroundIcon.Mod; foregroundIcon.Mod = mod; text.Text = mod.Name; - updateColour(mod); + Colour = mod.HasImplementation ? Color4.White : Color4.Gray; + updateCompatibility(mod); } - private Colour4 lightRed; - private Colour4 darkRed; - - private void updateColour(Mod mod) + private void updateCompatibility(Mod mod) { - var baseColour = mod.HasImplementation ? Color4.White : Color4.Gray; - if (globalSelectedMods != null) { if (!globalSelectedMods.Value.Contains(mod)) { if (!ModUtils.CheckCompatibleSet(globalSelectedMods.Value.Concat(new[] { mod }))) { - baseColour = mod.HasImplementation ? lightRed : darkRed; + incompatibleIcon.FadeIn(); + return; } } } - Colour = baseColour; + incompatibleIcon.FadeOut(); } private void createIcons() @@ -312,11 +310,24 @@ namespace osu.Game.Overlays.Mods { scaleContainer = new Container { - Child = iconsContainer = new Container + Children = new Drawable[] { - RelativeSizeAxes = Axes.Both, - Origin = Anchor.Centre, - Anchor = Anchor.Centre, + iconsContainer = new Container + { + RelativeSizeAxes = Axes.Both, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + }, + incompatibleIcon = new SpriteIcon + { + Origin = Anchor.BottomRight, + Anchor = Anchor.BottomRight, + Icon = FontAwesome.Solid.Ban, + Colour = Color4.Red, + Size = new Vector2(30), + Shadow = true, + Alpha = 0 + } }, RelativeSizeAxes = Axes.Both, Origin = Anchor.Centre, @@ -338,11 +349,9 @@ namespace osu.Game.Overlays.Mods } [BackgroundDependencyLoader] - private void load(OsuColour colour) + private void load() { - lightRed = colour.RedLight; - darkRed = colour.RedDark; - globalSelectedMods.BindValueChanged(_ => updateColour(SelectedMod ?? Mods.FirstOrDefault()), true); + globalSelectedMods.BindValueChanged(_ => updateCompatibility(SelectedMod ?? Mods.FirstOrDefault()), true); } public ITooltip GetCustomTooltip() => new ModButtonTooltip(); From b8fe03b77f8912bf1f6cf9b65548194a54e4ad0b Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Tue, 24 Aug 2021 09:50:09 +0800 Subject: [PATCH 6/9] Use `Mod.Equals` for comparison --- osu.Game/Overlays/Mods/ModButtonTooltip.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModButtonTooltip.cs b/osu.Game/Overlays/Mods/ModButtonTooltip.cs index 1b889281f0..666ed07e28 100644 --- a/osu.Game/Overlays/Mods/ModButtonTooltip.cs +++ b/osu.Game/Overlays/Mods/ModButtonTooltip.cs @@ -80,16 +80,16 @@ namespace osu.Game.Overlays.Mods protected override void PopIn() => this.FadeIn(200, Easing.OutQuint); protected override void PopOut() => this.FadeOut(200, Easing.OutQuint); - private string lastMod; + private Mod lastMod; public bool SetContent(object content) { if (!(content is Mod mod)) return false; - if (mod.Acronym == lastMod) return true; + if (mod.Equals(lastMod)) return true; - lastMod = mod.Acronym; + lastMod = mod; descriptionText.Text = mod.Description; From bf0a1167ec990f64f3f98993f018d2eb758b8395 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 24 Aug 2021 13:35:39 +0900 Subject: [PATCH 7/9] Improve update flow and ensure selected mods is read from local context --- osu.Game/Overlays/Mods/ModButton.cs | 35 ++++++++++------------ osu.Game/Overlays/Mods/ModSelectOverlay.cs | 1 + 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index f4233c65cb..247c78152d 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Mods private int selectedIndex = -1; [Resolved] - private Bindable> globalSelectedMods { get; set; } + private Bindable> selectedMods { get; set; } /// /// Change the selected mod index of this button. @@ -245,24 +245,20 @@ namespace osu.Game.Overlays.Mods foregroundIcon.Mod = mod; text.Text = mod.Name; Colour = mod.HasImplementation ? Color4.White : Color4.Gray; - updateCompatibility(mod); + + Scheduler.AddOnce(updateCompatibility); } - private void updateCompatibility(Mod mod) + private void updateCompatibility() { - if (globalSelectedMods != null) - { - if (!globalSelectedMods.Value.Contains(mod)) - { - if (!ModUtils.CheckCompatibleSet(globalSelectedMods.Value.Concat(new[] { mod }))) - { - incompatibleIcon.FadeIn(); - return; - } - } - } + var m = SelectedMod ?? Mods.First(); - incompatibleIcon.FadeOut(); + bool isIncompatible = false; + + if (selectedMods.Value.Count > 0 && !selectedMods.Value.Contains(m)) + isIncompatible = !ModUtils.CheckCompatibleSet(selectedMods.Value.Append(m)); + + incompatibleIcon.FadeTo(isIncompatible ? 1 : 0, 200, Easing.OutQuint); } private void createIcons() @@ -287,6 +283,7 @@ namespace osu.Game.Overlays.Mods }, }); } + else { iconsContainer.Add(foregroundIcon = new ModIcon(Mod, false) @@ -344,14 +341,14 @@ namespace osu.Game.Overlays.Mods }, new HoverSounds() }; - Mod = mod; } - [BackgroundDependencyLoader] - private void load() + protected override void LoadComplete() { - globalSelectedMods.BindValueChanged(_ => updateCompatibility(SelectedMod ?? Mods.FirstOrDefault()), true); + base.LoadComplete(); + + selectedMods.BindValueChanged(_ => Scheduler.AddOnce(updateCompatibility), true); } public ITooltip GetCustomTooltip() => new ModButtonTooltip(); diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 96eba7808f..fdef48d556 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -74,6 +74,7 @@ namespace osu.Game.Overlays.Mods protected readonly ModSettingsContainer ModSettingsContainer; + [Cached] public readonly Bindable> SelectedMods = new Bindable>(Array.Empty()); private Bindable>> availableMods; From afd01d22d6c29b9bbf1ba6bc0efe344269f1ad64 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 24 Aug 2021 13:58:31 +0900 Subject: [PATCH 8/9] Adjust visuals of incompatible icon and move to own class --- osu.Game/Overlays/Mods/IncompatibleIcon.cs | 64 ++++++++++++++++++++++ osu.Game/Overlays/Mods/ModButton.cs | 17 +++--- 2 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 osu.Game/Overlays/Mods/IncompatibleIcon.cs diff --git a/osu.Game/Overlays/Mods/IncompatibleIcon.cs b/osu.Game/Overlays/Mods/IncompatibleIcon.cs new file mode 100644 index 0000000000..df134fe4a4 --- /dev/null +++ b/osu.Game/Overlays/Mods/IncompatibleIcon.cs @@ -0,0 +1,64 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Cursor; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; +using osu.Game.Graphics; +using osuTK; +using osuTK.Graphics; + +namespace osu.Game.Overlays.Mods +{ + public class IncompatibleIcon : VisibilityContainer, IHasTooltip + { + private Circle circle; + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + Size = new Vector2(20); + + State.Value = Visibility.Hidden; + Alpha = 0; + + InternalChildren = new Drawable[] + { + circle = new Circle + { + RelativeSizeAxes = Axes.Both, + Colour = colours.Gray4, + }, + new SpriteIcon + { + RelativeSizeAxes = Axes.Both, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + Size = new Vector2(0.6f), + Icon = FontAwesome.Solid.Slash, + Colour = Color4.White, + Shadow = true, + } + }; + } + + protected override void PopIn() + { + this.FadeIn(200, Easing.OutQuint); + circle.FlashColour(Color4.Red, 500, Easing.OutQuint); + this.ScaleTo(1.8f).Then().ScaleTo(1, 500, Easing.OutQuint); + } + + protected override void PopOut() + { + this.FadeOut(200, Easing.OutQuint); + this.ScaleTo(0.8f, 200, Easing.In); + } + + public LocalisableString TooltipText => "Incompatible with current selected mods"; + } +} diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 247c78152d..76046f2467 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Mods private ModIcon backgroundIcon; private readonly SpriteText text; private readonly Container iconsContainer; - private readonly SpriteIcon incompatibleIcon; + private readonly CompositeDrawable incompatibleIcon; /// /// Fired when the selection changes. @@ -258,7 +258,10 @@ namespace osu.Game.Overlays.Mods if (selectedMods.Value.Count > 0 && !selectedMods.Value.Contains(m)) isIncompatible = !ModUtils.CheckCompatibleSet(selectedMods.Value.Append(m)); - incompatibleIcon.FadeTo(isIncompatible ? 1 : 0, 200, Easing.OutQuint); + if (isIncompatible) + incompatibleIcon.Show(); + else + incompatibleIcon.Hide(); } private void createIcons() @@ -315,15 +318,11 @@ namespace osu.Game.Overlays.Mods Origin = Anchor.Centre, Anchor = Anchor.Centre, }, - incompatibleIcon = new SpriteIcon + incompatibleIcon = new IncompatibleIcon { - Origin = Anchor.BottomRight, + Origin = Anchor.Centre, Anchor = Anchor.BottomRight, - Icon = FontAwesome.Solid.Ban, - Colour = Color4.Red, - Size = new Vector2(30), - Shadow = true, - Alpha = 0 + Position = new Vector2(-13), } }, RelativeSizeAxes = Axes.Both, From c3b7ce0b059bd90529bf00eb8eadd1db256d1c9c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 24 Aug 2021 14:02:50 +0900 Subject: [PATCH 9/9] Remove stray newline --- osu.Game/Overlays/Mods/ModButton.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 76046f2467..4675eb6bc8 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -286,7 +286,6 @@ namespace osu.Game.Overlays.Mods }, }); } - else { iconsContainer.Add(foregroundIcon = new ModIcon(Mod, false)