1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Apply more missed cases

This commit is contained in:
Dean Herbert 2019-04-01 12:44:46 +09:00
parent 612db31c38
commit c39c37a18d
95 changed files with 250 additions and 0 deletions

View File

@ -78,6 +78,7 @@ namespace osu.Desktop.Updater
case RuntimeInfo.Platform.Windows: case RuntimeInfo.Platform.Windows:
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".exe")); bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".exe"));
break; break;
case RuntimeInfo.Platform.MacOsx: case RuntimeInfo.Platform.MacOsx:
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".app.zip")); bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".app.zip"));
break; break;

View File

@ -36,11 +36,13 @@ namespace osu.Game.Rulesets.Catch.Tests
yield return new ConvertValue((CatchHitObject)nested); yield return new ConvertValue((CatchHitObject)nested);
break; break;
case BananaShower shower: case BananaShower shower:
foreach (var nested in shower.NestedHitObjects) foreach (var nested in shower.NestedHitObjects)
yield return new ConvertValue((CatchHitObject)nested); yield return new ConvertValue((CatchHitObject)nested);
break; break;
default: default:
yield return new ConvertValue((CatchHitObject)hitObject); yield return new ConvertValue((CatchHitObject)hitObject);

View File

@ -87,6 +87,7 @@ namespace osu.Game.Rulesets.Catch
new CatchModNoFail(), new CatchModNoFail(),
new MultiMod(new CatchModHalfTime(), new CatchModDaycore()) new MultiMod(new CatchModHalfTime(), new CatchModDaycore())
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -96,17 +97,20 @@ namespace osu.Game.Rulesets.Catch
new CatchModHidden(), new CatchModHidden(),
new CatchModFlashlight(), new CatchModFlashlight(),
}; };
case ModType.Automation: case ModType.Automation:
return new Mod[] return new Mod[]
{ {
new MultiMod(new CatchModAutoplay(), new ModCinema()), new MultiMod(new CatchModAutoplay(), new ModCinema()),
new CatchModRelax(), new CatchModRelax(),
}; };
case ModType.Fun: case ModType.Fun:
return new Mod[] return new Mod[]
{ {
new MultiMod(new ModWindUp<CatchHitObject>(), new ModWindDown<CatchHitObject>()) new MultiMod(new ModWindUp<CatchHitObject>(), new ModWindDown<CatchHitObject>())
}; };
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 1100; return 1100;
} }
@ -27,6 +28,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 8; return 8;
} }

View File

@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 30; return 30;
} }
@ -24,6 +25,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 7; return 7;
} }

View File

@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 300; return 300;
} }
@ -28,6 +29,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 10.2; return 10.2;
} }

View File

@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 10; return 10;
} }
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Perfect: case HitResult.Perfect:
return 4; return 4;
} }

View File

@ -84,6 +84,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
case ArmedState.Miss: case ArmedState.Miss:
this.FadeOut(250).RotateTo(Rotation * 2, 250, Easing.Out).Expire(); this.FadeOut(250).RotateTo(Rotation * 2, 250, Easing.Out).Expire();
break; break;
case ArmedState.Hit: case ArmedState.Hit:
this.FadeOut().Expire(); this.FadeOut().Expire();
break; break;

View File

@ -95,6 +95,7 @@ namespace osu.Game.Rulesets.Catch.Objects
X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH, X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH,
}); });
break; break;
case SliderEventType.Head: case SliderEventType.Head:
case SliderEventType.Tail: case SliderEventType.Tail:
case SliderEventType.Repeat: case SliderEventType.Repeat:

View File

@ -46,14 +46,19 @@ namespace osu.Game.Rulesets.Catch.UI
{ {
case Banana banana: case Banana banana:
return new DrawableBanana(banana); return new DrawableBanana(banana);
case Fruit fruit: case Fruit fruit:
return new DrawableFruit(fruit); return new DrawableFruit(fruit);
case JuiceStream stream: case JuiceStream stream:
return new DrawableJuiceStream(stream, CreateDrawableRepresentation); return new DrawableJuiceStream(stream, CreateDrawableRepresentation);
case BananaShower shower: case BananaShower shower:
return new DrawableBananaShower(shower, CreateDrawableRepresentation); return new DrawableBananaShower(shower, CreateDrawableRepresentation);
case TinyDroplet tiny: case TinyDroplet tiny:
return new DrawableTinyDroplet(tiny); return new DrawableTinyDroplet(tiny);
case Droplet droplet: case Droplet droplet:
return new DrawableDroplet(droplet); return new DrawableDroplet(droplet);
} }

View File

@ -38,9 +38,11 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
case 8 when HitObject.Samples.Any(s => s.Name == SampleInfo.HIT_FINISH) && endTime - HitObject.StartTime < 1000: case 8 when HitObject.Samples.Any(s => s.Name == SampleInfo.HIT_FINISH) && endTime - HitObject.StartTime < 1000:
addToPattern(pattern, 0, generateHold); addToPattern(pattern, 0, generateHold);
break; break;
case 8: case 8:
addToPattern(pattern, FindAvailableColumn(GetRandomColumn(), PreviousPattern), generateHold); addToPattern(pattern, FindAvailableColumn(GetRandomColumn(), PreviousPattern), generateHold);
break; break;
default: default:
if (TotalColumns > 0) if (TotalColumns > 0)
addToPattern(pattern, GetRandomColumn(), generateHold); addToPattern(pattern, GetRandomColumn(), generateHold);

View File

@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Edit
{ {
case DrawableNote note: case DrawableNote note:
return new NoteSelectionBlueprint(note); return new NoteSelectionBlueprint(note);
case DrawableHoldNote holdNote: case DrawableHoldNote holdNote:
return new HoldNoteSelectionBlueprint(holdNote); return new HoldNoteSelectionBlueprint(holdNote);
} }

View File

@ -14,12 +14,16 @@ namespace osu.Game.Rulesets.Mania.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Meh: case HitResult.Meh:
return 50; return 50;
case HitResult.Ok: case HitResult.Ok:
return 100; return 100;
case HitResult.Good: case HitResult.Good:
return 200; return 200;
case HitResult.Great: case HitResult.Great:
case HitResult.Perfect: case HitResult.Perfect:
return 300; return 300;

View File

@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
case ArmedState.Miss: case ArmedState.Miss:
this.FadeOut(150, Easing.In).Expire(); this.FadeOut(150, Easing.In).Expire();
break; break;
case ArmedState.Hit: case ArmedState.Hit:
this.FadeOut(150, Easing.OutQuint).Expire(); this.FadeOut(150, Easing.OutQuint).Expire();
break; break;

View File

@ -140,18 +140,23 @@ namespace osu.Game.Rulesets.Mania.Scoring
case HitResult.Miss: case HitResult.Miss:
Health.Value += hpMissMultiplier * hp_increase_miss; Health.Value += hpMissMultiplier * hp_increase_miss;
break; break;
case HitResult.Meh: case HitResult.Meh:
Health.Value += hpMultiplier * hp_increase_bad; Health.Value += hpMultiplier * hp_increase_bad;
break; break;
case HitResult.Ok: case HitResult.Ok:
Health.Value += hpMultiplier * hp_increase_ok; Health.Value += hpMultiplier * hp_increase_ok;
break; break;
case HitResult.Good: case HitResult.Good:
Health.Value += hpMultiplier * hp_increase_good; Health.Value += hpMultiplier * hp_increase_good;
break; break;
case HitResult.Great: case HitResult.Great:
Health.Value += hpMultiplier * hp_increase_great; Health.Value += hpMultiplier * hp_increase_great;
break; break;
case HitResult.Perfect: case HitResult.Perfect:
Health.Value += hpMultiplier * hp_increase_perfect; Health.Value += hpMultiplier * hp_increase_perfect;
break; break;

View File

@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Osu.Tests
yield return createConvertValue(nested); yield return createConvertValue(nested);
break; break;
default: default:
yield return createConvertValue(hitObject); yield return createConvertValue(hitObject);

View File

@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
case SliderPosition.Start: case SliderPosition.Start:
Position = slider.StackedPosition + slider.Path.PositionAt(0); Position = slider.StackedPosition + slider.Path.PositionAt(0);
break; break;
case SliderPosition.End: case SliderPosition.End:
Position = slider.StackedPosition + slider.Path.PositionAt(1); Position = slider.StackedPosition + slider.Path.PositionAt(1);
break; break;

View File

@ -41,8 +41,10 @@ namespace osu.Game.Rulesets.Osu.Edit
{ {
case DrawableHitCircle circle: case DrawableHitCircle circle:
return new HitCircleSelectionBlueprint(circle); return new HitCircleSelectionBlueprint(circle);
case DrawableSlider slider: case DrawableSlider slider:
return new SliderSelectionBlueprint(slider); return new SliderSelectionBlueprint(slider);
case DrawableSpinner spinner: case DrawableSpinner spinner:
return new SpinnerSelectionBlueprint(spinner); return new SpinnerSelectionBlueprint(spinner);
} }

View File

@ -16,10 +16,13 @@ namespace osu.Game.Rulesets.Osu.Judgements
{ {
default: default:
return 0; return 0;
case HitResult.Meh: case HitResult.Meh:
return 50; return 50;
case HitResult.Good: case HitResult.Good:
return 100; return 100;
case HitResult.Great: case HitResult.Great:
return 300; return 300;
} }

View File

@ -59,11 +59,13 @@ namespace osu.Game.Rulesets.Osu.Mods
circle.FadeOut(fadeOutDuration); circle.FadeOut(fadeOutDuration);
break; break;
case DrawableSlider slider: case DrawableSlider slider:
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true)) using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
slider.Body.FadeOut(longFadeDuration, Easing.Out); slider.Body.FadeOut(longFadeDuration, Easing.Out);
break; break;
case DrawableSliderTick sliderTick: case DrawableSliderTick sliderTick:
// slider ticks fade out over up to one second // slider ticks fade out over up to one second
var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000); var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000);
@ -72,6 +74,7 @@ namespace osu.Game.Rulesets.Osu.Mods
sliderTick.FadeOut(tickFadeOutDuration); sliderTick.FadeOut(tickFadeOutDuration);
break; break;
case DrawableSpinner spinner: case DrawableSpinner spinner:
// hide elements we don't care about. // hide elements we don't care about.
spinner.Disc.Hide(); spinner.Disc.Hide();

View File

@ -64,9 +64,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
case ArmedState.Idle: case ArmedState.Idle:
this.Delay(HitObject.TimePreempt).FadeOut(); this.Delay(HitObject.TimePreempt).FadeOut();
break; break;
case ArmedState.Miss: case ArmedState.Miss:
this.FadeOut(animDuration); this.FadeOut(animDuration);
break; break;
case ArmedState.Hit: case ArmedState.Hit:
this.FadeOut(animDuration, Easing.OutQuint) this.FadeOut(animDuration, Easing.OutQuint)
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out); .ScaleTo(Scale * 1.5f, animDuration, Easing.Out);

View File

@ -67,10 +67,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
case ArmedState.Idle: case ArmedState.Idle:
this.Delay(HitObject.TimePreempt).FadeOut(); this.Delay(HitObject.TimePreempt).FadeOut();
break; break;
case ArmedState.Miss: case ArmedState.Miss:
this.FadeOut(ANIM_DURATION); this.FadeOut(ANIM_DURATION);
this.FadeColour(Color4.Red, ANIM_DURATION / 2); this.FadeColour(Color4.Red, ANIM_DURATION / 2);
break; break;
case ArmedState.Hit: case ArmedState.Hit:
this.FadeOut(ANIM_DURATION, Easing.OutQuint); this.FadeOut(ANIM_DURATION, Easing.OutQuint);
this.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out); this.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out);

View File

@ -222,9 +222,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
case ArmedState.Idle: case ArmedState.Idle:
Expire(true); Expire(true);
break; break;
case ArmedState.Hit: case ArmedState.Hit:
sequence.ScaleTo(Scale * 1.2f, 320, Easing.Out); sequence.ScaleTo(Scale * 1.2f, 320, Easing.Out);
break; break;
case ArmedState.Miss: case ArmedState.Miss:
sequence.ScaleTo(Scale * 0.8f, 320, Easing.In); sequence.ScaleTo(Scale * 0.8f, 320, Easing.In);
break; break;

View File

@ -183,6 +183,7 @@ namespace osu.Game.Rulesets.Osu.Objects
Samples = sampleList Samples = sampleList
}); });
break; break;
case SliderEventType.Head: case SliderEventType.Head:
AddNested(HeadCircle = new SliderCircle AddNested(HeadCircle = new SliderCircle
{ {
@ -194,6 +195,7 @@ namespace osu.Game.Rulesets.Osu.Objects
ComboIndex = ComboIndex, ComboIndex = ComboIndex,
}); });
break; break;
case SliderEventType.LegacyLastTick: case SliderEventType.LegacyLastTick:
// we need to use the LegacyLastTick here for compatibility reasons (difficulty). // we need to use the LegacyLastTick here for compatibility reasons (difficulty).
// it is *okay* to use this because the TailCircle is not used for any meaningful purpose in gameplay. // it is *okay* to use this because the TailCircle is not used for any meaningful purpose in gameplay.
@ -206,6 +208,7 @@ namespace osu.Game.Rulesets.Osu.Objects
ComboIndex = ComboIndex, ComboIndex = ComboIndex,
}); });
break; break;
case SliderEventType.Repeat: case SliderEventType.Repeat:
AddNested(new RepeatPoint AddNested(new RepeatPoint
{ {

View File

@ -104,6 +104,7 @@ namespace osu.Game.Rulesets.Osu
new MultiMod(new OsuModHalfTime(), new OsuModDaycore()), new MultiMod(new OsuModHalfTime(), new OsuModDaycore()),
new OsuModSpunOut(), new OsuModSpunOut(),
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -113,11 +114,13 @@ namespace osu.Game.Rulesets.Osu
new OsuModHidden(), new OsuModHidden(),
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()), new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
}; };
case ModType.Conversion: case ModType.Conversion:
return new Mod[] return new Mod[]
{ {
new OsuModTarget(), new OsuModTarget(),
}; };
case ModType.Automation: case ModType.Automation:
return new Mod[] return new Mod[]
{ {
@ -125,6 +128,7 @@ namespace osu.Game.Rulesets.Osu
new OsuModRelax(), new OsuModRelax(),
new OsuModAutopilot(), new OsuModAutopilot(),
}; };
case ModType.Fun: case ModType.Fun:
return new Mod[] return new Mod[]
{ {
@ -133,6 +137,7 @@ namespace osu.Game.Rulesets.Osu
new OsuModGrow(), new OsuModGrow(),
new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()), new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()),
}; };
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -40,8 +40,10 @@ namespace osu.Game.Rulesets.Osu.UI
{ {
case HitCircle circle: case HitCircle circle:
return new DrawableHitCircle(circle); return new DrawableHitCircle(circle);
case Slider slider: case Slider slider:
return new DrawableSlider(slider); return new DrawableSlider(slider);
case Spinner spinner: case Spinner spinner:
return new DrawableSpinner(spinner); return new DrawableSpinner(spinner);
} }

View File

@ -100,15 +100,19 @@ namespace osu.Game.Rulesets.Taiko.Tests
case 1: case 1:
addCentreHit(false); addCentreHit(false);
break; break;
case 2: case 2:
addCentreHit(true); addCentreHit(true);
break; break;
case 3: case 3:
addDrumRoll(false); addDrumRoll(false);
break; break;
case 4: case 4:
addDrumRoll(true); addDrumRoll(true);
break; break;
case 5: case 5:
addSwell(); addSwell();
delay = scroll_time - 100; delay = scroll_time - 100;
@ -121,6 +125,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
default: default:
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500); playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
break; break;
case 6: case 6:
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_HEIGHT), 500); playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_HEIGHT), 500);
break; break;

View File

@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Miss: case HitResult.Miss:
return 0; return 0;
default: default:
return base.HealthIncreaseFor(result); return base.HealthIncreaseFor(result);
} }

View File

@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Great: case HitResult.Great:
return 200; return 200;
default: default:
return 0; return 0;
} }
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Great: case HitResult.Great:
return 0.15; return 0.15;
default: default:
return 0; return 0;
} }

View File

@ -16,8 +16,10 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Good: case HitResult.Good:
return 100; return 100;
case HitResult.Great: case HitResult.Great:
return 300; return 300;
default: default:
return 0; return 0;
} }
@ -29,10 +31,13 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Miss: case HitResult.Miss:
return -1.0; return -1.0;
case HitResult.Good: case HitResult.Good:
return 1.1; return 1.1;
case HitResult.Great: case HitResult.Great:
return 3.0; return 3.0;
default: default:
return 0; return 0;
} }

View File

@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{ {
case HitResult.Miss: case HitResult.Miss:
return -0.65; return -0.65;
default: default:
return 0; return 0;
} }

View File

@ -192,6 +192,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
using (BeginAbsoluteSequence(HitObject.StartTime - preempt, true)) using (BeginAbsoluteSequence(HitObject.StartTime - preempt, true))
targetRing.ScaleTo(target_ring_scale, preempt * 4, Easing.OutQuint); targetRing.ScaleTo(target_ring_scale, preempt * 4, Easing.OutQuint);
break; break;
case ArmedState.Miss: case ArmedState.Miss:
case ArmedState.Hit: case ArmedState.Hit:
this.FadeOut(out_transition_time, Easing.Out); this.FadeOut(out_transition_time, Easing.Out);

View File

@ -25,6 +25,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
case HitResult.Good: case HitResult.Good:
case HitResult.Miss: case HitResult.Miss:
return true; return true;
default: default:
return false; return false;
} }

View File

@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Taiko
new TaikoModNoFail(), new TaikoModNoFail(),
new MultiMod(new TaikoModHalfTime(), new TaikoModDaycore()), new MultiMod(new TaikoModHalfTime(), new TaikoModDaycore()),
}; };
case ModType.DifficultyIncrease: case ModType.DifficultyIncrease:
return new Mod[] return new Mod[]
{ {
@ -95,17 +96,20 @@ namespace osu.Game.Rulesets.Taiko
new TaikoModHidden(), new TaikoModHidden(),
new TaikoModFlashlight(), new TaikoModFlashlight(),
}; };
case ModType.Automation: case ModType.Automation:
return new Mod[] return new Mod[]
{ {
new MultiMod(new TaikoModAutoplay(), new ModCinema()), new MultiMod(new TaikoModAutoplay(), new ModCinema()),
new TaikoModRelax(), new TaikoModRelax(),
}; };
case ModType.Fun: case ModType.Fun:
return new Mod[] return new Mod[]
{ {
new MultiMod(new ModWindUp<TaikoHitObject>(), new ModWindDown<TaikoHitObject>()) new MultiMod(new ModWindUp<TaikoHitObject>(), new ModWindDown<TaikoHitObject>())
}; };
default: default:
return new Mod[] { }; return new Mod[] { };
} }

View File

@ -33,6 +33,7 @@ namespace osu.Game.Rulesets.Taiko.UI
case HitResult.Good: case HitResult.Good:
JudgementBody.Colour = colours.GreenLight; JudgementBody.Colour = colours.GreenLight;
break; break;
case HitResult.Great: case HitResult.Great:
JudgementBody.Colour = colours.BlueLight; JudgementBody.Colour = colours.BlueLight;
break; break;

View File

@ -52,9 +52,11 @@ namespace osu.Game.Rulesets.Taiko.UI
int currentIndex = 0; int currentIndex = 0;
int currentBeat = 0; int currentBeat = 0;
double time = timingPoints[currentIndex].Time; double time = timingPoints[currentIndex].Time;
while (time <= lastHitTime) while (time <= lastHitTime)
{ {
int nextIndex = currentIndex + 1; int nextIndex = currentIndex + 1;
if (nextIndex < timingPoints.Count && time > timingPoints[nextIndex].Time) if (nextIndex < timingPoints.Count && time > timingPoints[nextIndex].Time)
{ {
currentIndex = nextIndex; currentIndex = nextIndex;
@ -93,10 +95,13 @@ namespace osu.Game.Rulesets.Taiko.UI
{ {
case CentreHit centreHit: case CentreHit centreHit:
return new DrawableCentreHit(centreHit); return new DrawableCentreHit(centreHit);
case RimHit rimHit: case RimHit rimHit:
return new DrawableRimHit(rimHit); return new DrawableRimHit(rimHit);
case DrumRoll drumRoll: case DrumRoll drumRoll:
return new DrawableDrumRoll(drumRoll); return new DrawableDrumRoll(drumRoll);
case Swell swell: case Swell swell:
return new DrawableSwell(swell); return new DrawableSwell(swell);
} }

View File

@ -211,6 +211,7 @@ namespace osu.Game.Rulesets.Taiko.UI
case DrawableBarLine barline: case DrawableBarLine barline:
barlineContainer.Add(barline.CreateProxy()); barlineContainer.Add(barline.CreateProxy());
break; break;
case DrawableTaikoHitObject taikoObject: case DrawableTaikoHitObject taikoObject:
topLevelHitContainer.Add(taikoObject.CreateProxiedContent()); topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
break; break;
@ -231,6 +232,7 @@ namespace osu.Game.Rulesets.Taiko.UI
if (result.IsHit) if (result.IsHit)
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit(); hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
break; break;
default: default:
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject) judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
{ {

View File

@ -47,6 +47,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapGeneral() public void TestDecodeBeatmapGeneral()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -70,6 +71,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapEditor() public void TestDecodeBeatmapEditor()
{ {
var decoder = new LegacyBeatmapDecoder(); var decoder = new LegacyBeatmapDecoder();
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -95,6 +97,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapMetadata() public void TestDecodeBeatmapMetadata()
{ {
var decoder = new LegacyBeatmapDecoder(); var decoder = new LegacyBeatmapDecoder();
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -119,6 +122,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapDifficulty() public void TestDecodeBeatmapDifficulty()
{ {
var decoder = new LegacyBeatmapDecoder(); var decoder = new LegacyBeatmapDecoder();
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -137,6 +141,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapEvents() public void TestDecodeBeatmapEvents()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -155,6 +160,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapTimingPoints() public void TestDecodeBeatmapTimingPoints()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -190,6 +196,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapColours() public void TestDecodeBeatmapColours()
{ {
var decoder = new LegacySkinDecoder(); var decoder = new LegacySkinDecoder();
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -215,6 +222,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapComboOffsetsOsu() public void TestDecodeBeatmapComboOffsetsOsu()
{ {
var decoder = new LegacyBeatmapDecoder(); var decoder = new LegacyBeatmapDecoder();
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu")) using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -237,6 +245,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapComboOffsetsCatch() public void TestDecodeBeatmapComboOffsetsCatch()
{ {
var decoder = new LegacyBeatmapDecoder(); var decoder = new LegacyBeatmapDecoder();
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu")) using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -259,6 +268,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeBeatmapHitObjects() public void TestDecodeBeatmapHitObjects()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu")) using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -286,6 +296,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeControlPointCustomSampleBank() public void TestDecodeControlPointCustomSampleBank()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("controlpoint-custom-samplebank.osu")) using (var resStream = TestResources.OpenResource("controlpoint-custom-samplebank.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -307,6 +318,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeHitObjectCustomSampleBank() public void TestDecodeHitObjectCustomSampleBank()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("hitobject-custom-samplebank.osu")) using (var resStream = TestResources.OpenResource("hitobject-custom-samplebank.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -324,6 +336,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeHitObjectFileSamples() public void TestDecodeHitObjectFileSamples()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("hitobject-file-samples.osu")) using (var resStream = TestResources.OpenResource("hitobject-file-samples.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -343,6 +356,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeSliderSamples() public void TestDecodeSliderSamples()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("slider-samples.osu")) using (var resStream = TestResources.OpenResource("slider-samples.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -386,6 +400,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeHitObjectNullAdditionBank() public void TestDecodeHitObjectNullAdditionBank()
{ {
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false }; var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("hitobject-no-addition-bank.osu")) using (var resStream = TestResources.OpenResource("hitobject-no-addition-bank.osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {

View File

@ -19,6 +19,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeStoryboardEvents() public void TestDecodeStoryboardEvents()
{ {
var decoder = new LegacyStoryboardDecoder(); var decoder = new LegacyStoryboardDecoder();
using (var resStream = TestResources.OpenResource("Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu")) using (var resStream = TestResources.OpenResource("Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {
@ -91,6 +92,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void TestDecodeVariableWithSuffix() public void TestDecodeVariableWithSuffix()
{ {
var decoder = new LegacyStoryboardDecoder(); var decoder = new LegacyStoryboardDecoder();
using (var resStream = TestResources.OpenResource("variable-with-suffix.osb")) using (var resStream = TestResources.OpenResource("variable-with-suffix.osb"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {

View File

@ -151,6 +151,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
using (var sr = new StreamReader(stream)) using (var sr = new StreamReader(stream))
{ {
var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr); var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr);
using (var ms = new MemoryStream()) using (var ms = new MemoryStream())
using (var sw = new StreamWriter(ms)) using (var sw = new StreamWriter(ms))
using (var sr2 = new StreamReader(ms)) using (var sr2 = new StreamReader(ms))

View File

@ -75,6 +75,7 @@ namespace osu.Game.Tests.Beatmaps.IO
using (var osz = TestResources.GetTestBeatmapStream()) using (var osz = TestResources.GetTestBeatmapStream())
{ {
var reader = new ZipArchiveReader(osz); var reader = new ZipArchiveReader(osz);
using (var stream = new StreamReader( using (var stream = new StreamReader(
reader.GetStream("Soleily - Renatus (Deif) [Platter].osu"))) reader.GetStream("Soleily - Renatus (Deif) [Platter].osu")))
{ {

View File

@ -18,6 +18,7 @@ namespace osu.Game.Tests.Skins
public void TestDecodeSkinColours(bool hasColours) public void TestDecodeSkinColours(bool hasColours)
{ {
var decoder = new LegacySkinDecoder(); var decoder = new LegacySkinDecoder();
using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini")) using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini"))
using (var stream = new StreamReader(resStream)) using (var stream = new StreamReader(resStream))
{ {

View File

@ -124,12 +124,15 @@ namespace osu.Game.Tests.Visual.Gameplay
case ScrollingDirection.Up: case ScrollingDirection.Up:
obj.Anchor = Anchor.TopCentre; obj.Anchor = Anchor.TopCentre;
break; break;
case ScrollingDirection.Down: case ScrollingDirection.Down:
obj.Anchor = Anchor.BottomCentre; obj.Anchor = Anchor.BottomCentre;
break; break;
case ScrollingDirection.Left: case ScrollingDirection.Left:
obj.Anchor = Anchor.CentreLeft; obj.Anchor = Anchor.CentreLeft;
break; break;
case ScrollingDirection.Right: case ScrollingDirection.Right:
obj.Anchor = Anchor.CentreRight; obj.Anchor = Anchor.CentreRight;
break; break;
@ -184,6 +187,7 @@ namespace osu.Game.Tests.Visual.Gameplay
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = 2; Height = 2;
break; break;
case ScrollingDirection.Left: case ScrollingDirection.Left:
case ScrollingDirection.Right: case ScrollingDirection.Right:
RelativeSizeAxes = Axes.Y; RelativeSizeAxes = Axes.Y;

View File

@ -83,15 +83,19 @@ namespace osu.Game.Tests.Visual.SongSelect
case OsuRuleset _: case OsuRuleset _:
testInfoLabels(5); testInfoLabels(5);
break; break;
case TaikoRuleset _: case TaikoRuleset _:
testInfoLabels(5); testInfoLabels(5);
break; break;
case CatchRuleset _: case CatchRuleset _:
testInfoLabels(5); testInfoLabels(5);
break; break;
case ManiaRuleset _: case ManiaRuleset _:
testInfoLabels(4); testInfoLabels(4);
break; break;
default: default:
testInfoLabels(2); testInfoLabels(2);
break; break;

View File

@ -86,12 +86,15 @@ namespace osu.Game.Tests.Visual.UserInterface
case 0: case 0:
sendHelloNotification(); sendHelloNotification();
break; break;
case 1: case 1:
sendAmazingNotification(); sendAmazingNotification();
break; break;
case 2: case 2:
sendUploadProgress(); sendUploadProgress();
break; break;
case 3: case 3:
sendDownloadProgress(); sendDownloadProgress();
break; break;

View File

@ -32,9 +32,11 @@ namespace osu.Game.Beatmaps.Drawables
case BeatmapSetCoverType.Cover: case BeatmapSetCoverType.Cover:
resource = set.OnlineInfo.Covers.Cover; resource = set.OnlineInfo.Covers.Cover;
break; break;
case BeatmapSetCoverType.Card: case BeatmapSetCoverType.Card:
resource = set.OnlineInfo.Covers.Card; resource = set.OnlineInfo.Covers.Card;
break; break;
case BeatmapSetCoverType.List: case BeatmapSetCoverType.List:
resource = set.OnlineInfo.Covers.List; resource = set.OnlineInfo.Covers.List;
break; break;

View File

@ -63,15 +63,20 @@ namespace osu.Game.Beatmaps.Drawables
{ {
case DifficultyRating.Easy: case DifficultyRating.Easy:
return palette.Green; return palette.Green;
default: default:
case DifficultyRating.Normal: case DifficultyRating.Normal:
return palette.Blue; return palette.Blue;
case DifficultyRating.Hard: case DifficultyRating.Hard:
return palette.Yellow; return palette.Yellow;
case DifficultyRating.Insane: case DifficultyRating.Insane:
return palette.Pink; return palette.Pink;
case DifficultyRating.Expert: case DifficultyRating.Expert:
return palette.Purple; return palette.Purple;
case DifficultyRating.ExpertPlus: case DifficultyRating.ExpertPlus:
return palette.Gray0; return palette.Gray0;
} }

View File

@ -26,9 +26,11 @@ namespace osu.Game.Beatmaps
case null: case null:
Length = excess_length; Length = excess_length;
break; break;
case IHasEndTime endTime: case IHasEndTime endTime:
Length = endTime.EndTime + excess_length; Length = endTime.EndTime + excess_length;
break; break;
default: default:
Length = lastObject.StartTime + excess_length; Length = lastObject.StartTime + excess_length;
break; break;

View File

@ -84,6 +84,7 @@ namespace osu.Game.Graphics.Containers
case GlobalAction.Back: case GlobalAction.Back:
State = Visibility.Hidden; State = Visibility.Hidden;
return true; return true;
case GlobalAction.Select: case GlobalAction.Select:
return true; return true;
} }
@ -107,6 +108,7 @@ namespace osu.Game.Graphics.Containers
State = Visibility.Hidden; State = Visibility.Hidden;
break; break;
case Visibility.Hidden: case Visibility.Hidden:
if (PlaySamplesOnStateChange) samplePopOut?.Play(); if (PlaySamplesOnStateChange) samplePopOut?.Play();
if (BlockScreenWideMouse) osuGame?.RemoveBlockingOverlay(this); if (BlockScreenWideMouse) osuGame?.RemoveBlockingOverlay(this);

View File

@ -20,12 +20,14 @@ namespace osu.Game.Graphics
{ {
default: default:
throw new ArgumentException(@"Invalid hex string length!"); throw new ArgumentException(@"Invalid hex string length!");
case 3: case 3:
return new Color4( return new Color4(
(byte)(Convert.ToByte(hex.Substring(0, 1), 16) * 17), (byte)(Convert.ToByte(hex.Substring(0, 1), 16) * 17),
(byte)(Convert.ToByte(hex.Substring(1, 1), 16) * 17), (byte)(Convert.ToByte(hex.Substring(1, 1), 16) * 17),
(byte)(Convert.ToByte(hex.Substring(2, 1), 16) * 17), (byte)(Convert.ToByte(hex.Substring(2, 1), 16) * 17),
255); 255);
case 6: case 6:
return new Color4( return new Color4(
Convert.ToByte(hex.Substring(0, 2), 16), Convert.ToByte(hex.Substring(0, 2), 16),

View File

@ -42,8 +42,10 @@ namespace osu.Game.Graphics
{ {
case Typeface.Exo: case Typeface.Exo:
return "Exo2.0"; return "Exo2.0";
case Typeface.FontAwesome: case Typeface.FontAwesome:
return "FontAwesome"; return "FontAwesome";
case Typeface.Venera: case Typeface.Venera:
return "Venera"; return "Venera";
} }

View File

@ -104,9 +104,11 @@ namespace osu.Game.Graphics
case ScreenshotFormat.Png: case ScreenshotFormat.Png:
image.SaveAsPng(stream); image.SaveAsPng(stream);
break; break;
case ScreenshotFormat.Jpg: case ScreenshotFormat.Jpg:
image.SaveAsJpeg(stream); image.SaveAsJpeg(stream);
break; break;
default: default:
throw new ArgumentOutOfRangeException(nameof(screenshotFormat)); throw new ArgumentOutOfRangeException(nameof(screenshotFormat));
} }

View File

@ -88,9 +88,11 @@ namespace osu.Game.Graphics.UserInterface
case MenuItemType.Standard: case MenuItemType.Standard:
text.Colour = Color4.White; text.Colour = Color4.White;
break; break;
case MenuItemType.Destructive: case MenuItemType.Destructive:
text.Colour = Color4.Red; text.Colour = Color4.Red;
break; break;
case MenuItemType.Highlighted: case MenuItemType.Highlighted:
text.Colour = OsuColour.FromHex(@"ffcc22"); text.Colour = OsuColour.FromHex(@"ffcc22");
break; break;

View File

@ -62,6 +62,7 @@ namespace osu.Game.Input
case MouseUpEvent _: case MouseUpEvent _:
case MouseMoveEvent _: case MouseMoveEvent _:
return updateLastInteractionTime(); return updateLastInteractionTime();
default: default:
return base.Handle(e); return base.Handle(e);
} }

View File

@ -26,12 +26,15 @@ namespace osu.Game.Online.API.Requests
{ {
case PrimaryFilter.Open: case PrimaryFilter.Open:
break; break;
case PrimaryFilter.Owned: case PrimaryFilter.Owned:
target += "/owned"; target += "/owned";
break; break;
case PrimaryFilter.Participated: case PrimaryFilter.Participated:
target += "/participated"; target += "/participated";
break; break;
case PrimaryFilter.RecentlyEnded: case PrimaryFilter.RecentlyEnded:
target += "/ended"; target += "/ended";
break; break;

View File

@ -103,8 +103,10 @@ namespace osu.Game.Overlays
case APIState.Offline: case APIState.Offline:
case APIState.Failing: case APIState.Failing:
break; break;
case APIState.Connecting: case APIState.Connecting:
break; break;
case APIState.Online: case APIState.Online:
State = Visibility.Hidden; State = Visibility.Hidden;
break; break;

View File

@ -123,6 +123,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
}, },
}; };
break; break;
case DownloadState.Downloaded: case DownloadState.Downloaded:
textSprites.Children = new Drawable[] textSprites.Children = new Drawable[]
{ {
@ -133,9 +134,11 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
}, },
}; };
break; break;
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
this.FadeOut(200); this.FadeOut(200);
break; break;
case DownloadState.NotDownloaded: case DownloadState.NotDownloaded:
textSprites.Children = new Drawable[] textSprites.Children = new Drawable[]
{ {

View File

@ -225,11 +225,13 @@ namespace osu.Game.Overlays.BeatmapSet
RelativeSizeAxes = Axes.Y RelativeSizeAxes = Axes.Y
}; };
break; break;
case DownloadState.Downloading: case DownloadState.Downloading:
case DownloadState.Downloaded: case DownloadState.Downloaded:
// temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design. // temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design.
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value); downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
break; break;
default: default:
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value); downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
if (BeatmapSet.Value.OnlineInfo.HasVideo) if (BeatmapSet.Value.OnlineInfo.HasVideo)

View File

@ -58,6 +58,7 @@ namespace osu.Game.Overlays.Chat.Tabs
{ {
default: default:
return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested }; return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
case ChannelType.PM: case ChannelType.PM:
return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested }; return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested };
} }

View File

@ -85,9 +85,11 @@ namespace osu.Game.Overlays.Direct
case DownloadState.Downloaded: case DownloadState.Downloaded:
shakeContainer.Shake(); shakeContainer.Shake();
break; break;
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
game.PresentBeatmap(BeatmapSet.Value); game.PresentBeatmap(BeatmapSet.Value);
break; break;
default: default:
beatmaps.Download(BeatmapSet.Value, noVideo); beatmaps.Download(BeatmapSet.Value, noVideo);
break; break;
@ -110,9 +112,11 @@ namespace osu.Game.Overlays.Direct
icon.MoveToX(0, 500, Easing.InOutExpo); icon.MoveToX(0, 500, Easing.InOutExpo);
checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo); checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
break; break;
case DownloadState.Downloaded: case DownloadState.Downloaded:
background.FadeColour(colours.Yellow, 500, Easing.InOutExpo); background.FadeColour(colours.Yellow, 500, Easing.InOutExpo);
break; break;
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
background.FadeColour(colours.Green, 500, Easing.InOutExpo); background.FadeColour(colours.Green, 500, Easing.InOutExpo);
icon.MoveToX(-8, 500, Easing.InOutExpo); icon.MoveToX(-8, 500, Easing.InOutExpo);

View File

@ -43,10 +43,12 @@ namespace osu.Game.Overlays.Direct
progressBar.Current.Value = 0; progressBar.Current.Value = 0;
progressBar.FadeOut(500); progressBar.FadeOut(500);
break; break;
case DownloadState.Downloading: case DownloadState.Downloading:
progressBar.FadeIn(400, Easing.OutQuint); progressBar.FadeIn(400, Easing.OutQuint);
progressBar.ResizeHeightTo(4, 400, Easing.OutQuint); progressBar.ResizeHeightTo(4, 400, Easing.OutQuint);
break; break;
case DownloadState.Downloaded: case DownloadState.Downloaded:
progressBar.FadeIn(400, Easing.OutQuint); progressBar.FadeIn(400, Easing.OutQuint);
progressBar.ResizeHeightTo(4, 400, Easing.OutQuint); progressBar.ResizeHeightTo(4, 400, Easing.OutQuint);
@ -54,6 +56,7 @@ namespace osu.Game.Overlays.Direct
progressBar.Current.Value = 1; progressBar.Current.Value = 1;
progressBar.FillColour = colours.Yellow; progressBar.FillColour = colours.Yellow;
break; break;
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
progressBar.FadeOut(500); progressBar.FadeOut(500);
break; break;

View File

@ -55,6 +55,7 @@ namespace osu.Game.Overlays
SectionsContainer.FadeOut(300, Easing.OutQuint); SectionsContainer.FadeOut(300, Easing.OutQuint);
ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint); ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint);
break; break;
case Visibility.Hidden: case Visibility.Hidden:
Background.FadeTo(0.6f, 500, Easing.OutQuint); Background.FadeTo(0.6f, 500, Easing.OutQuint);
Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint); Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint);

View File

@ -156,11 +156,13 @@ namespace osu.Game.Overlays.MedalSplash
case DisplayState.None: case DisplayState.None:
medalContainer.ScaleTo(0); medalContainer.ScaleTo(0);
break; break;
case DisplayState.Icon: case DisplayState.Icon:
medalContainer medalContainer
.FadeIn(duration) .FadeIn(duration)
.ScaleTo(1, duration, Easing.OutElastic); .ScaleTo(1, duration, Easing.OutElastic);
break; break;
case DisplayState.MedalUnlocked: case DisplayState.MedalUnlocked:
medalContainer medalContainer
.FadeTo(1) .FadeTo(1)
@ -170,6 +172,7 @@ namespace osu.Game.Overlays.MedalSplash
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, Easing.OutExpo); this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, Easing.OutExpo);
unlocked.FadeInFromZero(duration); unlocked.FadeInFromZero(duration);
break; break;
case DisplayState.Full: case DisplayState.Full:
medalContainer medalContainer
.FadeTo(1) .FadeTo(1)

View File

@ -54,11 +54,13 @@ namespace osu.Game.Overlays.Notifications
Light.Pulsate = false; Light.Pulsate = false;
progressBar.Active = false; progressBar.Active = false;
break; break;
case ProgressNotificationState.Active: case ProgressNotificationState.Active:
Light.Colour = colourActive; Light.Colour = colourActive;
Light.Pulsate = true; Light.Pulsate = true;
progressBar.Active = true; progressBar.Active = true;
break; break;
case ProgressNotificationState.Cancelled: case ProgressNotificationState.Cancelled:
Light.Colour = colourCancelled; Light.Colour = colourCancelled;
Light.Pulsate = false; Light.Pulsate = false;
@ -145,6 +147,7 @@ namespace osu.Game.Overlays.Notifications
case ProgressNotificationState.Cancelled: case ProgressNotificationState.Cancelled:
base.Close(); base.Close();
break; break;
case ProgressNotificationState.Active: case ProgressNotificationState.Active:
case ProgressNotificationState.Queued: case ProgressNotificationState.Queued:
if (CancelRequested?.Invoke() != false) if (CancelRequested?.Invoke() != false)

View File

@ -188,6 +188,7 @@ namespace osu.Game.Overlays
optionCount = 1; optionCount = 1;
if (val) selectedOption = 0; if (val) selectedOption = 0;
break; break;
case Enum _: case Enum _:
var values = Enum.GetValues(description.RawValue.GetType()); var values = Enum.GetValues(description.RawValue.GetType());
optionCount = values.Length; optionCount = values.Length;

View File

@ -54,6 +54,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
default: default:
drawableScores = scores.Select(score => new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null)); drawableScores = scores.Select(score => new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null));
break; break;
case ScoreType.Recent: case ScoreType.Recent:
drawableScores = scores.Select(score => new DrawableTotalScore(score)); drawableScores = scores.Select(score => new DrawableTotalScore(score));
break; break;

View File

@ -87,6 +87,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
} }
}; };
break; break;
case APIState.Failing: case APIState.Failing:
case APIState.Connecting: case APIState.Connecting:
LinkFlowContainer linkFlow; LinkFlowContainer linkFlow;
@ -112,6 +113,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
linkFlow.AddLink("cancel", api.Logout, string.Empty); linkFlow.AddLink("cancel", api.Logout, string.Empty);
break; break;
case APIState.Online: case APIState.Online:
Children = new Drawable[] Children = new Drawable[]
{ {
@ -160,14 +162,17 @@ namespace osu.Game.Overlays.Settings.Sections.General
api.LocalUser.Value.Status.Value = new UserStatusOnline(); api.LocalUser.Value.Status.Value = new UserStatusOnline();
dropdown.StatusColour = colours.Green; dropdown.StatusColour = colours.Green;
break; break;
case UserAction.DoNotDisturb: case UserAction.DoNotDisturb:
api.LocalUser.Value.Status.Value = new UserStatusDoNotDisturb(); api.LocalUser.Value.Status.Value = new UserStatusDoNotDisturb();
dropdown.StatusColour = colours.Red; dropdown.StatusColour = colours.Red;
break; break;
case UserAction.AppearOffline: case UserAction.AppearOffline:
api.LocalUser.Value.Status.Value = new UserStatusOffline(); api.LocalUser.Value.Status.Value = new UserStatusOffline();
dropdown.StatusColour = colours.Gray7; dropdown.StatusColour = colours.Gray7;
break; break;
case UserAction.SignOut: case UserAction.SignOut:
api.Logout(); api.Logout();
break; break;

View File

@ -102,6 +102,7 @@ namespace osu.Game.Overlays.Settings
default: default:
this.ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, Easing.OutQuint); this.ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, Easing.OutQuint);
break; break;
case ExpandedState.Expanded: case ExpandedState.Expanded:
this.ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, Easing.OutQuint); this.ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, Easing.OutQuint);
break; break;

View File

@ -58,6 +58,7 @@ namespace osu.Game.Overlays.Toolbar
Text = @"Guest"; Text = @"Guest";
avatar.User = new User(); avatar.User = new User();
break; break;
case APIState.Online: case APIState.Online:
Text = api.LocalUser.Value.Username; Text = api.LocalUser.Value.Username;
avatar.User = api.LocalUser.Value; avatar.User = api.LocalUser.Value;

View File

@ -105,12 +105,14 @@ namespace osu.Game.Overlays
else else
volumeMeterMaster.Decrease(amount, isPrecise); volumeMeterMaster.Decrease(amount, isPrecise);
return true; return true;
case GlobalAction.IncreaseVolume: case GlobalAction.IncreaseVolume:
if (State == Visibility.Hidden) if (State == Visibility.Hidden)
Show(); Show();
else else
volumeMeterMaster.Increase(amount, isPrecise); volumeMeterMaster.Increase(amount, isPrecise);
return true; return true;
case GlobalAction.ToggleMute: case GlobalAction.ToggleMute:
Show(); Show();
muteButton.Current.Value = !muteButton.Current.Value; muteButton.Current.Value = !muteButton.Current.Value;

View File

@ -117,10 +117,12 @@ namespace osu.Game.Rulesets.Difficulty
yield return new ModNoMod(); yield return new ModNoMod();
break; break;
case 1: case 1:
yield return currentSet.Single(); yield return currentSet.Single();
break; break;
default: default:
yield return new MultiMod(currentSet.ToArray()); yield return new MultiMod(currentSet.ToArray());

View File

@ -122,8 +122,10 @@ namespace osu.Game.Rulesets.Edit
{ {
case ScrollEvent _: case ScrollEvent _:
return false; return false;
case MouseEvent _: case MouseEvent _:
return true; return true;
default: default:
return false; return false;
} }

View File

@ -89,6 +89,7 @@ namespace osu.Game.Rulesets.Judgements
{ {
case HitResult.None: case HitResult.None:
break; break;
case HitResult.Miss: case HitResult.Miss:
JudgementBody.ScaleTo(1.6f); JudgementBody.ScaleTo(1.6f);
JudgementBody.ScaleTo(1, 100, Easing.In); JudgementBody.ScaleTo(1, 100, Easing.In);
@ -98,6 +99,7 @@ namespace osu.Game.Rulesets.Judgements
this.Delay(600).FadeOut(200); this.Delay(600).FadeOut(200);
break; break;
default: default:
ApplyHitAnimations(); ApplyHitAnimations();
break; break;
@ -113,13 +115,17 @@ namespace osu.Game.Rulesets.Judgements
case HitResult.Perfect: case HitResult.Perfect:
case HitResult.Great: case HitResult.Great:
return colours.Blue; return colours.Blue;
case HitResult.Ok: case HitResult.Ok:
case HitResult.Good: case HitResult.Good:
return colours.Green; return colours.Green;
case HitResult.Meh: case HitResult.Meh:
return colours.Yellow; return colours.Yellow;
case HitResult.Miss: case HitResult.Miss:
return colours.Red; return colours.Red;
default: default:
return Color4.White; return Color4.White;
} }

View File

@ -73,10 +73,12 @@ namespace osu.Game.Rulesets.Mods
pitch.PitchAdjust /= lastAdjust; pitch.PitchAdjust /= lastAdjust;
pitch.PitchAdjust *= adjust; pitch.PitchAdjust *= adjust;
break; break;
case IHasTempoAdjust tempo: case IHasTempoAdjust tempo:
tempo.TempoAdjust /= lastAdjust; tempo.TempoAdjust /= lastAdjust;
tempo.TempoAdjust *= adjust; tempo.TempoAdjust *= adjust;
break; break;
default: default:
clock.Rate /= lastAdjust; clock.Rate /= lastAdjust;
clock.Rate *= adjust; clock.Rate *= adjust;

View File

@ -77,6 +77,7 @@ namespace osu.Game.Rulesets.Objects
case HitResult.Perfect: case HitResult.Perfect:
case HitResult.Ok: case HitResult.Ok:
return false; return false;
default: default:
return true; return true;
} }
@ -126,16 +127,22 @@ namespace osu.Game.Rulesets.Objects
{ {
case HitResult.Perfect: case HitResult.Perfect:
return Perfect / 2; return Perfect / 2;
case HitResult.Great: case HitResult.Great:
return Great / 2; return Great / 2;
case HitResult.Good: case HitResult.Good:
return Good / 2; return Good / 2;
case HitResult.Ok: case HitResult.Ok:
return Ok / 2; return Ok / 2;
case HitResult.Meh: case HitResult.Meh:
return Meh / 2; return Meh / 2;
case HitResult.Miss: case HitResult.Miss:
return Miss / 2; return Miss / 2;
default: default:
throw new ArgumentException(nameof(result)); throw new ArgumentException(nameof(result));
} }

View File

@ -313,9 +313,11 @@ namespace osu.Game.Rulesets.Scoring
{ {
case HitResult.None: case HitResult.None:
break; break;
case HitResult.Miss: case HitResult.Miss:
Combo.Value = 0; Combo.Value = 0;
break; break;
default: default:
Combo.Value++; Combo.Value++;
break; break;
@ -373,6 +375,7 @@ namespace osu.Game.Rulesets.Scoring
default: default:
case ScoringMode.Standardised: case ScoringMode.Standardised:
return max_score * (base_portion * baseScore / maxBaseScore + combo_portion * HighestCombo.Value / maxHighestCombo) + bonusScore; return max_score * (base_portion * baseScore / maxBaseScore + combo_portion * HighestCombo.Value / maxHighestCombo) + bonusScore;
case ScoringMode.Classic: case ScoringMode.Classic:
// should emulate osu-stable's scoring as closely as we can (https://osu.ppy.sh/help/wiki/Score/ScoreV1) // should emulate osu-stable's scoring as closely as we can (https://osu.ppy.sh/help/wiki/Score/ScoreV1)
return bonusScore + baseScore * (1 + Math.Max(0, HighestCombo.Value - 1) / 25); return bonusScore + baseScore * (1 + Math.Max(0, HighestCombo.Value - 1) / 25);

View File

@ -76,18 +76,22 @@ namespace osu.Game.Rulesets.UI
backgroundColour = colours.Yellow; backgroundColour = colours.Yellow;
highlightedColour = colours.YellowLight; highlightedColour = colours.YellowLight;
break; break;
case ModType.DifficultyReduction: case ModType.DifficultyReduction:
backgroundColour = colours.Green; backgroundColour = colours.Green;
highlightedColour = colours.GreenLight; highlightedColour = colours.GreenLight;
break; break;
case ModType.Automation: case ModType.Automation:
backgroundColour = colours.Blue; backgroundColour = colours.Blue;
highlightedColour = colours.BlueLight; highlightedColour = colours.BlueLight;
break; break;
case ModType.Conversion: case ModType.Conversion:
backgroundColour = colours.Purple; backgroundColour = colours.Purple;
highlightedColour = colours.PurpleLight; highlightedColour = colours.PurpleLight;
break; break;
case ModType.Fun: case ModType.Fun:
backgroundColour = colours.Pink; backgroundColour = colours.Pink;
highlightedColour = colours.PinkLight; highlightedColour = colours.PinkLight;

View File

@ -105,6 +105,7 @@ namespace osu.Game.Rulesets.UI
return false; return false;
break; break;
case MouseUpEvent mouseUp: case MouseUpEvent mouseUp:
if (!CurrentState.Mouse.IsPressed(mouseUp.Button)) if (!CurrentState.Mouse.IsPressed(mouseUp.Button))
return false; return false;

View File

@ -92,9 +92,11 @@ namespace osu.Game.Rulesets.UI.Scrolling
case ScrollVisualisationMethod.Sequential: case ScrollVisualisationMethod.Sequential:
scrollingInfo.Algorithm = new SequentialScrollAlgorithm(controlPoints); scrollingInfo.Algorithm = new SequentialScrollAlgorithm(controlPoints);
break; break;
case ScrollVisualisationMethod.Overlapping: case ScrollVisualisationMethod.Overlapping:
scrollingInfo.Algorithm = new OverlappingScrollAlgorithm(controlPoints); scrollingInfo.Algorithm = new OverlappingScrollAlgorithm(controlPoints);
break; break;
case ScrollVisualisationMethod.Constant: case ScrollVisualisationMethod.Constant:
scrollingInfo.Algorithm = new ConstantScrollAlgorithm(); scrollingInfo.Algorithm = new ConstantScrollAlgorithm();
break; break;
@ -159,6 +161,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
case GlobalAction.IncreaseScrollSpeed: case GlobalAction.IncreaseScrollSpeed:
this.TransformBindableTo(TimeRange, TimeRange.Value - time_span_step, 200, Easing.OutQuint); this.TransformBindableTo(TimeRange, TimeRange.Value - time_span_step, 200, Easing.OutQuint);
return true; return true;
case GlobalAction.DecreaseScrollSpeed: case GlobalAction.DecreaseScrollSpeed:
this.TransformBindableTo(TimeRange, TimeRange.Value + time_span_step, 200, Easing.OutQuint); this.TransformBindableTo(TimeRange, TimeRange.Value + time_span_step, 200, Easing.OutQuint);
return true; return true;

View File

@ -72,6 +72,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
case ScrollingDirection.Down: case ScrollingDirection.Down:
scrollLength = DrawSize.Y; scrollLength = DrawSize.Y;
break; break;
default: default:
scrollLength = DrawSize.X; scrollLength = DrawSize.X;
break; break;
@ -97,6 +98,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
case ScrollingDirection.Down: case ScrollingDirection.Down:
hitObject.Height = scrollingInfo.Algorithm.GetLength(hitObject.HitObject.StartTime, endTime.EndTime, timeRange.Value, scrollLength); hitObject.Height = scrollingInfo.Algorithm.GetLength(hitObject.HitObject.StartTime, endTime.EndTime, timeRange.Value, scrollLength);
break; break;
case ScrollingDirection.Left: case ScrollingDirection.Left:
case ScrollingDirection.Right: case ScrollingDirection.Right:
hitObject.Width = scrollingInfo.Algorithm.GetLength(hitObject.HitObject.StartTime, endTime.EndTime, timeRange.Value, scrollLength); hitObject.Width = scrollingInfo.Algorithm.GetLength(hitObject.HitObject.StartTime, endTime.EndTime, timeRange.Value, scrollLength);
@ -129,12 +131,15 @@ namespace osu.Game.Rulesets.UI.Scrolling
case ScrollingDirection.Up: case ScrollingDirection.Up:
hitObject.Y = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength); hitObject.Y = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
break; break;
case ScrollingDirection.Down: case ScrollingDirection.Down:
hitObject.Y = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength); hitObject.Y = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
break; break;
case ScrollingDirection.Left: case ScrollingDirection.Left:
hitObject.X = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength); hitObject.X = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
break; break;
case ScrollingDirection.Right: case ScrollingDirection.Right:
hitObject.X = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength); hitObject.X = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
break; break;

View File

@ -41,6 +41,7 @@ namespace osu.Game.Scoring.Legacy
case 3: case 3:
Statistics[HitResult.Great] = value; Statistics[HitResult.Great] = value;
break; break;
case 2: case 2:
Statistics[HitResult.Perfect] = value; Statistics[HitResult.Perfect] = value;
break; break;
@ -81,6 +82,7 @@ namespace osu.Game.Scoring.Legacy
case 1: case 1:
Statistics[HitResult.Good] = value; Statistics[HitResult.Good] = value;
break; break;
case 3: case 3:
Statistics[HitResult.Ok] = value; Statistics[HitResult.Ok] = value;
break; break;

View File

@ -236,10 +236,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
beatDivisor.Next(); beatDivisor.Next();
OnUserChange(Current.Value); OnUserChange(Current.Value);
return true; return true;
case Key.Left: case Key.Left:
beatDivisor.Previous(); beatDivisor.Previous();
OnUserChange(Current.Value); OnUserChange(Current.Value);
return true; return true;
default: default:
return false; return false;
} }
@ -307,18 +309,25 @@ namespace osu.Game.Screens.Edit.Compose.Components
{ {
case 2: case 2:
return colours.BlueLight; return colours.BlueLight;
case 4: case 4:
return colours.Blue; return colours.Blue;
case 8: case 8:
return colours.BlueDarker; return colours.BlueDarker;
case 16: case 16:
return colours.PurpleDark; return colours.PurpleDark;
case 3: case 3:
return colours.YellowLight; return colours.YellowLight;
case 6: case 6:
return colours.Yellow; return colours.Yellow;
case 12: case 12:
return colours.YellowDarker; return colours.YellowDarker;
default: default:
return Color4.White; return Color4.White;
} }

View File

@ -260,6 +260,7 @@ namespace osu.Game.Screens.Menu
box.ScaleTo(new Vector2(0, 1), 500, Easing.OutExpo); box.ScaleTo(new Vector2(0, 1), 500, Easing.OutExpo);
this.FadeOut(500); this.FadeOut(500);
break; break;
case 1: case 1:
box.ScaleTo(new Vector2(0, 1), 400, Easing.InSine); box.ScaleTo(new Vector2(0, 1), 400, Easing.InSine);
this.FadeOut(800); this.FadeOut(800);
@ -267,11 +268,13 @@ namespace osu.Game.Screens.Menu
} }
break; break;
case ButtonState.Expanded: case ButtonState.Expanded:
const int expand_duration = 500; const int expand_duration = 500;
box.ScaleTo(new Vector2(1, 1), expand_duration, Easing.OutExpo); box.ScaleTo(new Vector2(1, 1), expand_duration, Easing.OutExpo);
this.FadeIn(expand_duration / 6f); this.FadeIn(expand_duration / 6f);
break; break;
case ButtonState.Exploded: case ButtonState.Exploded:
const int explode_duration = 200; const int explode_duration = 200;
box.ScaleTo(new Vector2(2, 1), explode_duration, Easing.OutExpo); box.ScaleTo(new Vector2(2, 1), explode_duration, Easing.OutExpo);
@ -294,10 +297,12 @@ namespace osu.Game.Screens.Menu
case ButtonSystemState.Initial: case ButtonSystemState.Initial:
State = ButtonState.Contracted; State = ButtonState.Contracted;
break; break;
case ButtonSystemState.EnteringMode: case ButtonSystemState.EnteringMode:
ContractStyle = 1; ContractStyle = 1;
State = ButtonState.Contracted; State = ButtonState.Contracted;
break; break;
default: default:
if (value == VisibleState) if (value == VisibleState)
State = ButtonState.Expanded; State = ButtonState.Expanded;

View File

@ -57,6 +57,7 @@ namespace osu.Game.Screens.Menu
case ButtonSystemState.EnteringMode: case ButtonSystemState.EnteringMode:
State = Visibility.Hidden; State = Visibility.Hidden;
break; break;
case ButtonSystemState.TopLevel: case ButtonSystemState.TopLevel:
case ButtonSystemState.Play: case ButtonSystemState.Play:
State = Visibility.Visible; State = Visibility.Visible;
@ -109,6 +110,7 @@ namespace osu.Game.Screens.Menu
case ButtonAreaBackgroundState.Flat: case ButtonAreaBackgroundState.Flat:
this.ScaleTo(new Vector2(2, 0), 300, Easing.InSine); this.ScaleTo(new Vector2(2, 0), 300, Easing.InSine);
break; break;
case ButtonAreaBackgroundState.Normal: case ButtonAreaBackgroundState.Normal:
this.ScaleTo(Vector2.One, 400, Easing.OutQuint); this.ScaleTo(Vector2.One, 400, Easing.OutQuint);
break; break;
@ -127,6 +129,7 @@ namespace osu.Game.Screens.Menu
default: default:
State = ButtonAreaBackgroundState.Normal; State = ButtonAreaBackgroundState.Normal;
break; break;
case ButtonSystemState.Initial: case ButtonSystemState.Initial:
case ButtonSystemState.Exit: case ButtonSystemState.Exit:
case ButtonSystemState.EnteringMode: case ButtonSystemState.EnteringMode:

View File

@ -79,6 +79,7 @@ namespace osu.Game.Screens.Menu
case ButtonSystemState.Exit: case ButtonSystemState.Exit:
Background.FadeColour(Color4.White, 500, Easing.OutSine); Background.FadeColour(Color4.White, 500, Easing.OutSine);
break; break;
default: default:
Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine); Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine);
break; break;

View File

@ -221,6 +221,7 @@ namespace osu.Game.Screens.Play
else else
selectionIndex--; selectionIndex--;
return true; return true;
case Key.Down: case Key.Down:
if (selectionIndex == -1 || selectionIndex == InternalButtons.Count - 1) if (selectionIndex == -1 || selectionIndex == InternalButtons.Count - 1)
selectionIndex = 0; selectionIndex = 0;
@ -240,6 +241,7 @@ namespace osu.Game.Screens.Play
case GlobalAction.Back: case GlobalAction.Back:
BackAction.Invoke(); BackAction.Invoke();
return true; return true;
case GlobalAction.Select: case GlobalAction.Select:
SelectAction.Invoke(); SelectAction.Invoke();
return true; return true;

View File

@ -25,8 +25,10 @@ namespace osu.Game.Screens.Play
{ {
default: default:
return button.ToString(); return button.ToString();
case MouseButton.Left: case MouseButton.Left:
return @"M1"; return @"M1";
case MouseButton.Right: case MouseButton.Right:
return @"M2"; return @"M2";
} }

View File

@ -174,6 +174,7 @@ namespace osu.Game.Screens.Play
using (BeginDelayedSequence(1000)) using (BeginDelayedSequence(1000))
scheduledHide = Schedule(() => State = Visibility.Hidden); scheduledHide = Schedule(() => State = Visibility.Hidden);
break; break;
case Visibility.Hidden: case Visibility.Hidden:
this.FadeOut(1000, Easing.OutExpo); this.FadeOut(1000, Easing.OutExpo);
break; break;

View File

@ -38,10 +38,13 @@ namespace osu.Game.Screens.Select.Carousel
default: default:
case SortMode.Artist: case SortMode.Artist:
return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.InvariantCultureIgnoreCase); return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Title: case SortMode.Title:
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.InvariantCultureIgnoreCase); return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Author: case SortMode.Author:
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.InvariantCultureIgnoreCase); return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Difficulty: case SortMode.Difficulty:
return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty); return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty);
} }

View File

@ -66,6 +66,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.NotSelected: case CarouselItemState.NotSelected:
InternalChildren.ForEach(c => c.State.Value = CarouselItemState.Collapsed); InternalChildren.ForEach(c => c.State.Value = CarouselItemState.Collapsed);
break; break;
case CarouselItemState.Selected: case CarouselItemState.Selected:
InternalChildren.ForEach(c => InternalChildren.ForEach(c =>
{ {

View File

@ -69,6 +69,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.Selected: case CarouselItemState.Selected:
updateSelected(item); updateSelected(item);
break; break;
case CarouselItemState.NotSelected: case CarouselItemState.NotSelected:
case CarouselItemState.Collapsed: case CarouselItemState.Collapsed:
attemptSelection(); attemptSelection();

View File

@ -106,6 +106,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.NotSelected: case CarouselItemState.NotSelected:
Deselected(); Deselected();
break; break;
case CarouselItemState.Selected: case CarouselItemState.Selected:
Selected(); Selected();
break; break;

View File

@ -108,12 +108,14 @@ namespace osu.Game.Screens.Tournament
speedTo(1000f, 200); speedTo(1000f, 200);
tracker.FadeOut(100); tracker.FadeOut(100);
break; break;
case ScrollState.Stopping: case ScrollState.Stopping:
speedTo(0f, 2000); speedTo(0f, 2000);
tracker.FadeIn(200); tracker.FadeIn(200);
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Stopped, 2300); delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Stopped, 2300);
break; break;
case ScrollState.Stopped: case ScrollState.Stopped:
// Find closest to center // Find closest to center
if (!Children.Any()) if (!Children.Any())
@ -155,6 +157,7 @@ namespace osu.Game.Screens.Tournament
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Idle, 10000); delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Idle, 10000);
break; break;
case ScrollState.Idle: case ScrollState.Idle:
resetSelected(); resetSelected();

View File

@ -26,9 +26,11 @@ namespace osu.Game.Skinning
case @"Name": case @"Name":
skin.SkinInfo.Name = pair.Value; skin.SkinInfo.Name = pair.Value;
break; break;
case @"Author": case @"Author":
skin.SkinInfo.Creator = pair.Value; skin.SkinInfo.Creator = pair.Value;
break; break;
case @"CursorExpand": case @"CursorExpand":
skin.CursorExpand = pair.Value != "0"; skin.CursorExpand = pair.Value != "0";
break; break;
@ -42,6 +44,7 @@ namespace osu.Game.Skinning
case "HitCirclePrefix": case "HitCirclePrefix":
skin.HitCircleFont = pair.Value; skin.HitCircleFont = pair.Value;
break; break;
case "HitCircleOverlap": case "HitCircleOverlap":
skin.HitCircleOverlap = int.Parse(pair.Value); skin.HitCircleOverlap = int.Parse(pair.Value);
break; break;

View File

@ -74,9 +74,11 @@ namespace osu.Game.Tests.Visual
case ScrollVisualisationMethod.Constant: case ScrollVisualisationMethod.Constant:
implementation = new ConstantScrollAlgorithm(); implementation = new ConstantScrollAlgorithm();
break; break;
case ScrollVisualisationMethod.Overlapping: case ScrollVisualisationMethod.Overlapping:
implementation = new OverlappingScrollAlgorithm(ControlPoints); implementation = new OverlappingScrollAlgorithm(ControlPoints);
break; break;
case ScrollVisualisationMethod.Sequential: case ScrollVisualisationMethod.Sequential:
implementation = new SequentialScrollAlgorithm(ControlPoints); implementation = new SequentialScrollAlgorithm(ControlPoints);
break; break;