1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:12:57 +08:00
This commit is contained in:
DrabWeb 2017-02-22 12:12:41 -04:00
parent 337a1004d3
commit 4821f323b8
2 changed files with 10 additions and 19 deletions

View File

@ -290,7 +290,7 @@ namespace osu.Game.Modes
public override FontAwesome Icon => FontAwesome.fa_osu_mod_target; public override FontAwesome Icon => FontAwesome.fa_osu_mod_target;
public override double ScoreMultiplier(PlayMode mode) => 1; public override double ScoreMultiplier(PlayMode mode) => 1;
public override bool Ranked(PlayMode mode) => mode == PlayMode.Osu; 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 public class ModKey9 : KeyMod

View File

@ -138,7 +138,7 @@ namespace osu.Game.Overlays.Mods
{ {
section.ButtonsContainer.TransformSpacingTo(new Vector2(100f, 0f), content_exit_duration, EasingTypes.InSine); section.ButtonsContainer.TransformSpacingTo(new Vector2(100f, 0f), content_exit_duration, EasingTypes.InSine);
section.ButtonsContainer.MoveToX(100f, 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) private void modButtonPressed(Mod selectedMod)
{ {
// TODO: Find out why selectedMod is occasionally null when spamming mod buttons
if (selectedMod != null) if (selectedMod != null)
{ {
foreach (Modes.Mods disableMod in selectedMod.DisablesMods(ModMode)) foreach (Modes.Mods disableMod in selectedMod.DisablesMods(ModMode))
@ -219,20 +218,13 @@ namespace osu.Game.Overlays.Mods
private void refreshSelectedMods() private void refreshSelectedMods()
{ {
List<Mod> selectedMods = new List<Mod>(); List<Mod> selectedMods = new List<Mod>();
foreach (Mod mod in difficultyReductionSection.SelectedMods) foreach (ModSection section in sections)
{ {
selectedMods.Add(mod); foreach (Mod mod in section.SelectedMods)
} {
selectedMods.Add(mod);
foreach (Mod mod in difficultyIncreaseSection.SelectedMods) }
{
selectedMods.Add(mod);
}
foreach (Mod mod in assistedSection.SelectedMods)
{
selectedMods.Add(mod);
} }
SelectedMods.Value = selectedMods.ToArray(); SelectedMods.Value = selectedMods.ToArray();
@ -245,8 +237,7 @@ namespace osu.Game.Overlays.Mods
ThirdWaveColour = OsuColour.FromHex(@"005774"); ThirdWaveColour = OsuColour.FromHex(@"005774");
FourthWaveColour = OsuColour.FromHex(@"003a4e"); FourthWaveColour = OsuColour.FromHex(@"003a4e");
Height = 510; // TODO: Remove when autosize works Height = 510;
//AutoSizeAxes = Axes.Y;
Content.RelativeSizeAxes = Axes.X; Content.RelativeSizeAxes = Axes.X;
Content.AutoSizeAxes = Axes.Y; Content.AutoSizeAxes = Axes.Y;
Children = new Drawable[] Children = new Drawable[]