From 4821f323b8ab290f3f2ce222b4e90700a4414147 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 22 Feb 2017 12:12:41 -0400 Subject: [PATCH] Cleanup --- osu.Game/Modes/Mod.cs | 2 +- osu.Game/Overlays/Mods/ModSelectOverlay.cs | 27 ++++++++-------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/osu.Game/Modes/Mod.cs b/osu.Game/Modes/Mod.cs index 66593483fc..d7966b23bf 100644 --- a/osu.Game/Modes/Mod.cs +++ b/osu.Game/Modes/Mod.cs @@ -290,7 +290,7 @@ namespace osu.Game.Modes public override FontAwesome Icon => FontAwesome.fa_osu_mod_target; public override double ScoreMultiplier(PlayMode mode) => 1; public override bool Ranked(PlayMode mode) => mode == PlayMode.Osu; - public override Mods[] DisablesMods(PlayMode mode) => new Mods[] {}; // TODO: Find out what mods target practice disables as it's not in the stable client + public override Mods[] DisablesMods(PlayMode mode) => new Mods[] {}; } public class ModKey9 : KeyMod diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 5cf054c187..73062f2bd2 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -138,7 +138,7 @@ namespace osu.Game.Overlays.Mods { section.ButtonsContainer.TransformSpacingTo(new Vector2(100f, 0f), content_exit_duration, EasingTypes.InSine); section.ButtonsContainer.MoveToX(100f, content_exit_duration, EasingTypes.InSine); - section.ButtonsContainer.FadeTo(0f, content_exit_duration, EasingTypes.InSine); // TODO: Maybe fix this as when items are fully transparent the mod section resizes to 0 height + section.ButtonsContainer.FadeOut(content_exit_duration, EasingTypes.InSine); } } @@ -155,7 +155,6 @@ namespace osu.Game.Overlays.Mods private void modButtonPressed(Mod selectedMod) { - // TODO: Find out why selectedMod is occasionally null when spamming mod buttons if (selectedMod != null) { foreach (Modes.Mods disableMod in selectedMod.DisablesMods(ModMode)) @@ -219,20 +218,13 @@ namespace osu.Game.Overlays.Mods private void refreshSelectedMods() { List selectedMods = new List(); - - foreach (Mod mod in difficultyReductionSection.SelectedMods) - { - selectedMods.Add(mod); - } - - foreach (Mod mod in difficultyIncreaseSection.SelectedMods) - { - selectedMods.Add(mod); - } - - foreach (Mod mod in assistedSection.SelectedMods) - { - selectedMods.Add(mod); + + foreach (ModSection section in sections) + { + foreach (Mod mod in section.SelectedMods) + { + selectedMods.Add(mod); + } } SelectedMods.Value = selectedMods.ToArray(); @@ -245,8 +237,7 @@ namespace osu.Game.Overlays.Mods ThirdWaveColour = OsuColour.FromHex(@"005774"); FourthWaveColour = OsuColour.FromHex(@"003a4e"); - Height = 510; // TODO: Remove when autosize works - //AutoSizeAxes = Axes.Y; + Height = 510; Content.RelativeSizeAxes = Axes.X; Content.AutoSizeAxes = Axes.Y; Children = new Drawable[]