mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Apply more missed cases
This commit is contained in:
parent
612db31c38
commit
c39c37a18d
@ -78,6 +78,7 @@ namespace osu.Desktop.Updater
|
||||
case RuntimeInfo.Platform.Windows:
|
||||
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".exe"));
|
||||
break;
|
||||
|
||||
case RuntimeInfo.Platform.MacOsx:
|
||||
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".app.zip"));
|
||||
break;
|
||||
|
@ -36,11 +36,13 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
yield return new ConvertValue((CatchHitObject)nested);
|
||||
|
||||
break;
|
||||
|
||||
case BananaShower shower:
|
||||
foreach (var nested in shower.NestedHitObjects)
|
||||
yield return new ConvertValue((CatchHitObject)nested);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
yield return new ConvertValue((CatchHitObject)hitObject);
|
||||
|
||||
|
@ -87,6 +87,7 @@ namespace osu.Game.Rulesets.Catch
|
||||
new CatchModNoFail(),
|
||||
new MultiMod(new CatchModHalfTime(), new CatchModDaycore())
|
||||
};
|
||||
|
||||
case ModType.DifficultyIncrease:
|
||||
return new Mod[]
|
||||
{
|
||||
@ -96,17 +97,20 @@ namespace osu.Game.Rulesets.Catch
|
||||
new CatchModHidden(),
|
||||
new CatchModFlashlight(),
|
||||
};
|
||||
|
||||
case ModType.Automation:
|
||||
return new Mod[]
|
||||
{
|
||||
new MultiMod(new CatchModAutoplay(), new ModCinema()),
|
||||
new CatchModRelax(),
|
||||
};
|
||||
|
||||
case ModType.Fun:
|
||||
return new Mod[]
|
||||
{
|
||||
new MultiMod(new ModWindUp<CatchHitObject>(), new ModWindDown<CatchHitObject>())
|
||||
};
|
||||
|
||||
default:
|
||||
return new Mod[] { };
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 1100;
|
||||
}
|
||||
@ -27,6 +28,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 8;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 30;
|
||||
}
|
||||
@ -24,6 +25,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 7;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 300;
|
||||
}
|
||||
@ -28,6 +29,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 10.2;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 10;
|
||||
}
|
||||
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Perfect:
|
||||
return 4;
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(250).RotateTo(Rotation * 2, 250, Easing.Out).Expire();
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut().Expire();
|
||||
break;
|
||||
|
@ -95,6 +95,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||
});
|
||||
break;
|
||||
|
||||
case SliderEventType.Head:
|
||||
case SliderEventType.Tail:
|
||||
case SliderEventType.Repeat:
|
||||
|
@ -46,14 +46,19 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
{
|
||||
case Banana banana:
|
||||
return new DrawableBanana(banana);
|
||||
|
||||
case Fruit fruit:
|
||||
return new DrawableFruit(fruit);
|
||||
|
||||
case JuiceStream stream:
|
||||
return new DrawableJuiceStream(stream, CreateDrawableRepresentation);
|
||||
|
||||
case BananaShower shower:
|
||||
return new DrawableBananaShower(shower, CreateDrawableRepresentation);
|
||||
|
||||
case TinyDroplet tiny:
|
||||
return new DrawableTinyDroplet(tiny);
|
||||
|
||||
case Droplet droplet:
|
||||
return new DrawableDroplet(droplet);
|
||||
}
|
||||
|
@ -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:
|
||||
addToPattern(pattern, 0, generateHold);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
addToPattern(pattern, FindAvailableColumn(GetRandomColumn(), PreviousPattern), generateHold);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (TotalColumns > 0)
|
||||
addToPattern(pattern, GetRandomColumn(), generateHold);
|
||||
|
@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
{
|
||||
case DrawableNote note:
|
||||
return new NoteSelectionBlueprint(note);
|
||||
|
||||
case DrawableHoldNote holdNote:
|
||||
return new HoldNoteSelectionBlueprint(holdNote);
|
||||
}
|
||||
|
@ -14,12 +14,16 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Meh:
|
||||
return 50;
|
||||
|
||||
case HitResult.Ok:
|
||||
return 100;
|
||||
|
||||
case HitResult.Good:
|
||||
return 200;
|
||||
|
||||
case HitResult.Great:
|
||||
case HitResult.Perfect:
|
||||
return 300;
|
||||
|
@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(150, Easing.In).Expire();
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(150, Easing.OutQuint).Expire();
|
||||
break;
|
||||
|
@ -140,18 +140,23 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
||||
case HitResult.Miss:
|
||||
Health.Value += hpMissMultiplier * hp_increase_miss;
|
||||
break;
|
||||
|
||||
case HitResult.Meh:
|
||||
Health.Value += hpMultiplier * hp_increase_bad;
|
||||
break;
|
||||
|
||||
case HitResult.Ok:
|
||||
Health.Value += hpMultiplier * hp_increase_ok;
|
||||
break;
|
||||
|
||||
case HitResult.Good:
|
||||
Health.Value += hpMultiplier * hp_increase_good;
|
||||
break;
|
||||
|
||||
case HitResult.Great:
|
||||
Health.Value += hpMultiplier * hp_increase_great;
|
||||
break;
|
||||
|
||||
case HitResult.Perfect:
|
||||
Health.Value += hpMultiplier * hp_increase_perfect;
|
||||
break;
|
||||
|
@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
yield return createConvertValue(nested);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
yield return createConvertValue(hitObject);
|
||||
|
||||
|
@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
case SliderPosition.Start:
|
||||
Position = slider.StackedPosition + slider.Path.PositionAt(0);
|
||||
break;
|
||||
|
||||
case SliderPosition.End:
|
||||
Position = slider.StackedPosition + slider.Path.PositionAt(1);
|
||||
break;
|
||||
|
@ -41,8 +41,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
case DrawableHitCircle circle:
|
||||
return new HitCircleSelectionBlueprint(circle);
|
||||
|
||||
case DrawableSlider slider:
|
||||
return new SliderSelectionBlueprint(slider);
|
||||
|
||||
case DrawableSpinner spinner:
|
||||
return new SpinnerSelectionBlueprint(spinner);
|
||||
}
|
||||
|
@ -16,10 +16,13 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
|
||||
case HitResult.Meh:
|
||||
return 50;
|
||||
|
||||
case HitResult.Good:
|
||||
return 100;
|
||||
|
||||
case HitResult.Great:
|
||||
return 300;
|
||||
}
|
||||
|
@ -59,11 +59,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
circle.FadeOut(fadeOutDuration);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSlider slider:
|
||||
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
slider.Body.FadeOut(longFadeDuration, Easing.Out);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSliderTick sliderTick:
|
||||
// slider ticks fade out over up to one second
|
||||
var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000);
|
||||
@ -72,6 +74,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
sliderTick.FadeOut(tickFadeOutDuration);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSpinner spinner:
|
||||
// hide elements we don't care about.
|
||||
spinner.Disc.Hide();
|
||||
|
@ -64,9 +64,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
case ArmedState.Idle:
|
||||
this.Delay(HitObject.TimePreempt).FadeOut();
|
||||
break;
|
||||
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(animDuration);
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(animDuration, Easing.OutQuint)
|
||||
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
||||
|
@ -67,10 +67,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
case ArmedState.Idle:
|
||||
this.Delay(HitObject.TimePreempt).FadeOut();
|
||||
break;
|
||||
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(ANIM_DURATION);
|
||||
this.FadeColour(Color4.Red, ANIM_DURATION / 2);
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(ANIM_DURATION, Easing.OutQuint);
|
||||
this.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out);
|
||||
|
@ -222,9 +222,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
case ArmedState.Idle:
|
||||
Expire(true);
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
sequence.ScaleTo(Scale * 1.2f, 320, Easing.Out);
|
||||
break;
|
||||
|
||||
case ArmedState.Miss:
|
||||
sequence.ScaleTo(Scale * 0.8f, 320, Easing.In);
|
||||
break;
|
||||
|
@ -183,6 +183,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
Samples = sampleList
|
||||
});
|
||||
break;
|
||||
|
||||
case SliderEventType.Head:
|
||||
AddNested(HeadCircle = new SliderCircle
|
||||
{
|
||||
@ -194,6 +195,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
ComboIndex = ComboIndex,
|
||||
});
|
||||
break;
|
||||
|
||||
case SliderEventType.LegacyLastTick:
|
||||
// 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.
|
||||
@ -206,6 +208,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
ComboIndex = ComboIndex,
|
||||
});
|
||||
break;
|
||||
|
||||
case SliderEventType.Repeat:
|
||||
AddNested(new RepeatPoint
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
new MultiMod(new OsuModHalfTime(), new OsuModDaycore()),
|
||||
new OsuModSpunOut(),
|
||||
};
|
||||
|
||||
case ModType.DifficultyIncrease:
|
||||
return new Mod[]
|
||||
{
|
||||
@ -113,11 +114,13 @@ namespace osu.Game.Rulesets.Osu
|
||||
new OsuModHidden(),
|
||||
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
|
||||
};
|
||||
|
||||
case ModType.Conversion:
|
||||
return new Mod[]
|
||||
{
|
||||
new OsuModTarget(),
|
||||
};
|
||||
|
||||
case ModType.Automation:
|
||||
return new Mod[]
|
||||
{
|
||||
@ -125,6 +128,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
new OsuModRelax(),
|
||||
new OsuModAutopilot(),
|
||||
};
|
||||
|
||||
case ModType.Fun:
|
||||
return new Mod[]
|
||||
{
|
||||
@ -133,6 +137,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
new OsuModGrow(),
|
||||
new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()),
|
||||
};
|
||||
|
||||
default:
|
||||
return new Mod[] { };
|
||||
}
|
||||
|
@ -40,8 +40,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
case HitCircle circle:
|
||||
return new DrawableHitCircle(circle);
|
||||
|
||||
case Slider slider:
|
||||
return new DrawableSlider(slider);
|
||||
|
||||
case Spinner spinner:
|
||||
return new DrawableSpinner(spinner);
|
||||
}
|
||||
|
@ -100,15 +100,19 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
case 1:
|
||||
addCentreHit(false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
addCentreHit(true);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
addDrumRoll(false);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
addDrumRoll(true);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
addSwell();
|
||||
delay = scroll_time - 100;
|
||||
@ -121,6 +125,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
default:
|
||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_HEIGHT), 500);
|
||||
break;
|
||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Miss:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return base.HealthIncreaseFor(result);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Great:
|
||||
return 200;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Great:
|
||||
return 0.15;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -16,8 +16,10 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Good:
|
||||
return 100;
|
||||
|
||||
case HitResult.Great:
|
||||
return 300;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@ -29,10 +31,13 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Miss:
|
||||
return -1.0;
|
||||
|
||||
case HitResult.Good:
|
||||
return 1.1;
|
||||
|
||||
case HitResult.Great:
|
||||
return 3.0;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
case HitResult.Miss:
|
||||
return -0.65;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -192,6 +192,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
using (BeginAbsoluteSequence(HitObject.StartTime - preempt, true))
|
||||
targetRing.ScaleTo(target_ring_scale, preempt * 4, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
case ArmedState.Miss:
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(out_transition_time, Easing.Out);
|
||||
|
@ -25,6 +25,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
case HitResult.Good:
|
||||
case HitResult.Miss:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Taiko
|
||||
new TaikoModNoFail(),
|
||||
new MultiMod(new TaikoModHalfTime(), new TaikoModDaycore()),
|
||||
};
|
||||
|
||||
case ModType.DifficultyIncrease:
|
||||
return new Mod[]
|
||||
{
|
||||
@ -95,17 +96,20 @@ namespace osu.Game.Rulesets.Taiko
|
||||
new TaikoModHidden(),
|
||||
new TaikoModFlashlight(),
|
||||
};
|
||||
|
||||
case ModType.Automation:
|
||||
return new Mod[]
|
||||
{
|
||||
new MultiMod(new TaikoModAutoplay(), new ModCinema()),
|
||||
new TaikoModRelax(),
|
||||
};
|
||||
|
||||
case ModType.Fun:
|
||||
return new Mod[]
|
||||
{
|
||||
new MultiMod(new ModWindUp<TaikoHitObject>(), new ModWindDown<TaikoHitObject>())
|
||||
};
|
||||
|
||||
default:
|
||||
return new Mod[] { };
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
case HitResult.Good:
|
||||
JudgementBody.Colour = colours.GreenLight;
|
||||
break;
|
||||
|
||||
case HitResult.Great:
|
||||
JudgementBody.Colour = colours.BlueLight;
|
||||
break;
|
||||
|
@ -52,9 +52,11 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
int currentIndex = 0;
|
||||
int currentBeat = 0;
|
||||
double time = timingPoints[currentIndex].Time;
|
||||
|
||||
while (time <= lastHitTime)
|
||||
{
|
||||
int nextIndex = currentIndex + 1;
|
||||
|
||||
if (nextIndex < timingPoints.Count && time > timingPoints[nextIndex].Time)
|
||||
{
|
||||
currentIndex = nextIndex;
|
||||
@ -93,10 +95,13 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
case CentreHit centreHit:
|
||||
return new DrawableCentreHit(centreHit);
|
||||
|
||||
case RimHit rimHit:
|
||||
return new DrawableRimHit(rimHit);
|
||||
|
||||
case DrumRoll drumRoll:
|
||||
return new DrawableDrumRoll(drumRoll);
|
||||
|
||||
case Swell swell:
|
||||
return new DrawableSwell(swell);
|
||||
}
|
||||
|
@ -211,6 +211,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
case DrawableBarLine barline:
|
||||
barlineContainer.Add(barline.CreateProxy());
|
||||
break;
|
||||
|
||||
case DrawableTaikoHitObject taikoObject:
|
||||
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
|
||||
break;
|
||||
@ -231,6 +232,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
if (result.IsHit)
|
||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
|
||||
break;
|
||||
|
||||
default:
|
||||
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapGeneral()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -70,6 +71,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapEditor()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -95,6 +97,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapMetadata()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -119,6 +122,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapDifficulty()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -137,6 +141,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapEvents()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -155,6 +160,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapTimingPoints()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -190,6 +196,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapColours()
|
||||
{
|
||||
var decoder = new LegacySkinDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -215,6 +222,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapComboOffsetsOsu()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -237,6 +245,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapComboOffsetsCatch()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -259,6 +268,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeBeatmapHitObjects()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -286,6 +296,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeControlPointCustomSampleBank()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("controlpoint-custom-samplebank.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -307,6 +318,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeHitObjectCustomSampleBank()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("hitobject-custom-samplebank.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -324,6 +336,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeHitObjectFileSamples()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("hitobject-file-samples.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -343,6 +356,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeSliderSamples()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("slider-samples.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -386,6 +400,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeHitObjectNullAdditionBank()
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var resStream = TestResources.OpenResource("hitobject-no-addition-bank.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeStoryboardEvents()
|
||||
{
|
||||
var decoder = new LegacyStoryboardDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
@ -91,6 +92,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
public void TestDecodeVariableWithSuffix()
|
||||
{
|
||||
var decoder = new LegacyStoryboardDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource("variable-with-suffix.osb"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
|
@ -151,6 +151,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
using (var sr = new StreamReader(stream))
|
||||
{
|
||||
var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr);
|
||||
|
||||
using (var ms = new MemoryStream())
|
||||
using (var sw = new StreamWriter(ms))
|
||||
using (var sr2 = new StreamReader(ms))
|
||||
|
@ -75,6 +75,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
||||
using (var osz = TestResources.GetTestBeatmapStream())
|
||||
{
|
||||
var reader = new ZipArchiveReader(osz);
|
||||
|
||||
using (var stream = new StreamReader(
|
||||
reader.GetStream("Soleily - Renatus (Deif) [Platter].osu")))
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ namespace osu.Game.Tests.Skins
|
||||
public void TestDecodeSkinColours(bool hasColours)
|
||||
{
|
||||
var decoder = new LegacySkinDecoder();
|
||||
|
||||
using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
{
|
||||
|
@ -124,12 +124,15 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
case ScrollingDirection.Up:
|
||||
obj.Anchor = Anchor.TopCentre;
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Down:
|
||||
obj.Anchor = Anchor.BottomCentre;
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Left:
|
||||
obj.Anchor = Anchor.CentreLeft;
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Right:
|
||||
obj.Anchor = Anchor.CentreRight;
|
||||
break;
|
||||
@ -184,6 +187,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 2;
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Left:
|
||||
case ScrollingDirection.Right:
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
|
@ -83,15 +83,19 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
case OsuRuleset _:
|
||||
testInfoLabels(5);
|
||||
break;
|
||||
|
||||
case TaikoRuleset _:
|
||||
testInfoLabels(5);
|
||||
break;
|
||||
|
||||
case CatchRuleset _:
|
||||
testInfoLabels(5);
|
||||
break;
|
||||
|
||||
case ManiaRuleset _:
|
||||
testInfoLabels(4);
|
||||
break;
|
||||
|
||||
default:
|
||||
testInfoLabels(2);
|
||||
break;
|
||||
|
@ -86,12 +86,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
case 0:
|
||||
sendHelloNotification();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
sendAmazingNotification();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendUploadProgress();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendDownloadProgress();
|
||||
break;
|
||||
|
@ -32,9 +32,11 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
case BeatmapSetCoverType.Cover:
|
||||
resource = set.OnlineInfo.Covers.Cover;
|
||||
break;
|
||||
|
||||
case BeatmapSetCoverType.Card:
|
||||
resource = set.OnlineInfo.Covers.Card;
|
||||
break;
|
||||
|
||||
case BeatmapSetCoverType.List:
|
||||
resource = set.OnlineInfo.Covers.List;
|
||||
break;
|
||||
|
@ -63,15 +63,20 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
case DifficultyRating.Easy:
|
||||
return palette.Green;
|
||||
|
||||
default:
|
||||
case DifficultyRating.Normal:
|
||||
return palette.Blue;
|
||||
|
||||
case DifficultyRating.Hard:
|
||||
return palette.Yellow;
|
||||
|
||||
case DifficultyRating.Insane:
|
||||
return palette.Pink;
|
||||
|
||||
case DifficultyRating.Expert:
|
||||
return palette.Purple;
|
||||
|
||||
case DifficultyRating.ExpertPlus:
|
||||
return palette.Gray0;
|
||||
}
|
||||
|
@ -26,9 +26,11 @@ namespace osu.Game.Beatmaps
|
||||
case null:
|
||||
Length = excess_length;
|
||||
break;
|
||||
|
||||
case IHasEndTime endTime:
|
||||
Length = endTime.EndTime + excess_length;
|
||||
break;
|
||||
|
||||
default:
|
||||
Length = lastObject.StartTime + excess_length;
|
||||
break;
|
||||
|
@ -84,6 +84,7 @@ namespace osu.Game.Graphics.Containers
|
||||
case GlobalAction.Back:
|
||||
State = Visibility.Hidden;
|
||||
return true;
|
||||
|
||||
case GlobalAction.Select:
|
||||
return true;
|
||||
}
|
||||
@ -107,6 +108,7 @@ namespace osu.Game.Graphics.Containers
|
||||
State = Visibility.Hidden;
|
||||
|
||||
break;
|
||||
|
||||
case Visibility.Hidden:
|
||||
if (PlaySamplesOnStateChange) samplePopOut?.Play();
|
||||
if (BlockScreenWideMouse) osuGame?.RemoveBlockingOverlay(this);
|
||||
|
@ -20,12 +20,14 @@ namespace osu.Game.Graphics
|
||||
{
|
||||
default:
|
||||
throw new ArgumentException(@"Invalid hex string length!");
|
||||
|
||||
case 3:
|
||||
return new Color4(
|
||||
(byte)(Convert.ToByte(hex.Substring(0, 1), 16) * 17),
|
||||
(byte)(Convert.ToByte(hex.Substring(1, 1), 16) * 17),
|
||||
(byte)(Convert.ToByte(hex.Substring(2, 1), 16) * 17),
|
||||
255);
|
||||
|
||||
case 6:
|
||||
return new Color4(
|
||||
Convert.ToByte(hex.Substring(0, 2), 16),
|
||||
|
@ -42,8 +42,10 @@ namespace osu.Game.Graphics
|
||||
{
|
||||
case Typeface.Exo:
|
||||
return "Exo2.0";
|
||||
|
||||
case Typeface.FontAwesome:
|
||||
return "FontAwesome";
|
||||
|
||||
case Typeface.Venera:
|
||||
return "Venera";
|
||||
}
|
||||
|
@ -104,9 +104,11 @@ namespace osu.Game.Graphics
|
||||
case ScreenshotFormat.Png:
|
||||
image.SaveAsPng(stream);
|
||||
break;
|
||||
|
||||
case ScreenshotFormat.Jpg:
|
||||
image.SaveAsJpeg(stream);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(screenshotFormat));
|
||||
}
|
||||
|
@ -88,9 +88,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
case MenuItemType.Standard:
|
||||
text.Colour = Color4.White;
|
||||
break;
|
||||
|
||||
case MenuItemType.Destructive:
|
||||
text.Colour = Color4.Red;
|
||||
break;
|
||||
|
||||
case MenuItemType.Highlighted:
|
||||
text.Colour = OsuColour.FromHex(@"ffcc22");
|
||||
break;
|
||||
|
@ -62,6 +62,7 @@ namespace osu.Game.Input
|
||||
case MouseUpEvent _:
|
||||
case MouseMoveEvent _:
|
||||
return updateLastInteractionTime();
|
||||
|
||||
default:
|
||||
return base.Handle(e);
|
||||
}
|
||||
|
@ -26,12 +26,15 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
case PrimaryFilter.Open:
|
||||
break;
|
||||
|
||||
case PrimaryFilter.Owned:
|
||||
target += "/owned";
|
||||
break;
|
||||
|
||||
case PrimaryFilter.Participated:
|
||||
target += "/participated";
|
||||
break;
|
||||
|
||||
case PrimaryFilter.RecentlyEnded:
|
||||
target += "/ended";
|
||||
break;
|
||||
|
@ -103,8 +103,10 @@ namespace osu.Game.Overlays
|
||||
case APIState.Offline:
|
||||
case APIState.Failing:
|
||||
break;
|
||||
|
||||
case APIState.Connecting:
|
||||
break;
|
||||
|
||||
case APIState.Online:
|
||||
State = Visibility.Hidden;
|
||||
break;
|
||||
|
@ -123,6 +123,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
},
|
||||
};
|
||||
break;
|
||||
|
||||
case DownloadState.Downloaded:
|
||||
textSprites.Children = new Drawable[]
|
||||
{
|
||||
@ -133,9 +134,11 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
},
|
||||
};
|
||||
break;
|
||||
|
||||
case DownloadState.LocallyAvailable:
|
||||
this.FadeOut(200);
|
||||
break;
|
||||
|
||||
case DownloadState.NotDownloaded:
|
||||
textSprites.Children = new Drawable[]
|
||||
{
|
||||
|
@ -225,11 +225,13 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
RelativeSizeAxes = Axes.Y
|
||||
};
|
||||
break;
|
||||
|
||||
case DownloadState.Downloading:
|
||||
case DownloadState.Downloaded:
|
||||
// temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design.
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
|
||||
if (BeatmapSet.Value.OnlineInfo.HasVideo)
|
||||
|
@ -58,6 +58,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
{
|
||||
default:
|
||||
return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
|
||||
case ChannelType.PM:
|
||||
return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
}
|
||||
|
@ -85,9 +85,11 @@ namespace osu.Game.Overlays.Direct
|
||||
case DownloadState.Downloaded:
|
||||
shakeContainer.Shake();
|
||||
break;
|
||||
|
||||
case DownloadState.LocallyAvailable:
|
||||
game.PresentBeatmap(BeatmapSet.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
beatmaps.Download(BeatmapSet.Value, noVideo);
|
||||
break;
|
||||
@ -110,9 +112,11 @@ namespace osu.Game.Overlays.Direct
|
||||
icon.MoveToX(0, 500, Easing.InOutExpo);
|
||||
checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
|
||||
break;
|
||||
|
||||
case DownloadState.Downloaded:
|
||||
background.FadeColour(colours.Yellow, 500, Easing.InOutExpo);
|
||||
break;
|
||||
|
||||
case DownloadState.LocallyAvailable:
|
||||
background.FadeColour(colours.Green, 500, Easing.InOutExpo);
|
||||
icon.MoveToX(-8, 500, Easing.InOutExpo);
|
||||
|
@ -43,10 +43,12 @@ namespace osu.Game.Overlays.Direct
|
||||
progressBar.Current.Value = 0;
|
||||
progressBar.FadeOut(500);
|
||||
break;
|
||||
|
||||
case DownloadState.Downloading:
|
||||
progressBar.FadeIn(400, Easing.OutQuint);
|
||||
progressBar.ResizeHeightTo(4, 400, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
case DownloadState.Downloaded:
|
||||
progressBar.FadeIn(400, Easing.OutQuint);
|
||||
progressBar.ResizeHeightTo(4, 400, Easing.OutQuint);
|
||||
@ -54,6 +56,7 @@ namespace osu.Game.Overlays.Direct
|
||||
progressBar.Current.Value = 1;
|
||||
progressBar.FillColour = colours.Yellow;
|
||||
break;
|
||||
|
||||
case DownloadState.LocallyAvailable:
|
||||
progressBar.FadeOut(500);
|
||||
break;
|
||||
|
@ -55,6 +55,7 @@ namespace osu.Game.Overlays
|
||||
SectionsContainer.FadeOut(300, Easing.OutQuint);
|
||||
ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
case Visibility.Hidden:
|
||||
Background.FadeTo(0.6f, 500, Easing.OutQuint);
|
||||
Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint);
|
||||
|
@ -156,11 +156,13 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
case DisplayState.None:
|
||||
medalContainer.ScaleTo(0);
|
||||
break;
|
||||
|
||||
case DisplayState.Icon:
|
||||
medalContainer
|
||||
.FadeIn(duration)
|
||||
.ScaleTo(1, duration, Easing.OutElastic);
|
||||
break;
|
||||
|
||||
case DisplayState.MedalUnlocked:
|
||||
medalContainer
|
||||
.FadeTo(1)
|
||||
@ -170,6 +172,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, Easing.OutExpo);
|
||||
unlocked.FadeInFromZero(duration);
|
||||
break;
|
||||
|
||||
case DisplayState.Full:
|
||||
medalContainer
|
||||
.FadeTo(1)
|
||||
|
@ -54,11 +54,13 @@ namespace osu.Game.Overlays.Notifications
|
||||
Light.Pulsate = false;
|
||||
progressBar.Active = false;
|
||||
break;
|
||||
|
||||
case ProgressNotificationState.Active:
|
||||
Light.Colour = colourActive;
|
||||
Light.Pulsate = true;
|
||||
progressBar.Active = true;
|
||||
break;
|
||||
|
||||
case ProgressNotificationState.Cancelled:
|
||||
Light.Colour = colourCancelled;
|
||||
Light.Pulsate = false;
|
||||
@ -145,6 +147,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
case ProgressNotificationState.Cancelled:
|
||||
base.Close();
|
||||
break;
|
||||
|
||||
case ProgressNotificationState.Active:
|
||||
case ProgressNotificationState.Queued:
|
||||
if (CancelRequested?.Invoke() != false)
|
||||
|
@ -188,6 +188,7 @@ namespace osu.Game.Overlays
|
||||
optionCount = 1;
|
||||
if (val) selectedOption = 0;
|
||||
break;
|
||||
|
||||
case Enum _:
|
||||
var values = Enum.GetValues(description.RawValue.GetType());
|
||||
optionCount = values.Length;
|
||||
|
@ -54,6 +54,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
default:
|
||||
drawableScores = scores.Select(score => new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null));
|
||||
break;
|
||||
|
||||
case ScoreType.Recent:
|
||||
drawableScores = scores.Select(score => new DrawableTotalScore(score));
|
||||
break;
|
||||
|
@ -87,6 +87,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case APIState.Failing:
|
||||
case APIState.Connecting:
|
||||
LinkFlowContainer linkFlow;
|
||||
@ -112,6 +113,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
|
||||
linkFlow.AddLink("cancel", api.Logout, string.Empty);
|
||||
break;
|
||||
|
||||
case APIState.Online:
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -160,14 +162,17 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
api.LocalUser.Value.Status.Value = new UserStatusOnline();
|
||||
dropdown.StatusColour = colours.Green;
|
||||
break;
|
||||
|
||||
case UserAction.DoNotDisturb:
|
||||
api.LocalUser.Value.Status.Value = new UserStatusDoNotDisturb();
|
||||
dropdown.StatusColour = colours.Red;
|
||||
break;
|
||||
|
||||
case UserAction.AppearOffline:
|
||||
api.LocalUser.Value.Status.Value = new UserStatusOffline();
|
||||
dropdown.StatusColour = colours.Gray7;
|
||||
break;
|
||||
|
||||
case UserAction.SignOut:
|
||||
api.Logout();
|
||||
break;
|
||||
|
@ -102,6 +102,7 @@ namespace osu.Game.Overlays.Settings
|
||||
default:
|
||||
this.ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
case ExpandedState.Expanded:
|
||||
this.ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, Easing.OutQuint);
|
||||
break;
|
||||
|
@ -58,6 +58,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
Text = @"Guest";
|
||||
avatar.User = new User();
|
||||
break;
|
||||
|
||||
case APIState.Online:
|
||||
Text = api.LocalUser.Value.Username;
|
||||
avatar.User = api.LocalUser.Value;
|
||||
|
@ -105,12 +105,14 @@ namespace osu.Game.Overlays
|
||||
else
|
||||
volumeMeterMaster.Decrease(amount, isPrecise);
|
||||
return true;
|
||||
|
||||
case GlobalAction.IncreaseVolume:
|
||||
if (State == Visibility.Hidden)
|
||||
Show();
|
||||
else
|
||||
volumeMeterMaster.Increase(amount, isPrecise);
|
||||
return true;
|
||||
|
||||
case GlobalAction.ToggleMute:
|
||||
Show();
|
||||
muteButton.Current.Value = !muteButton.Current.Value;
|
||||
|
@ -117,10 +117,12 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
yield return new ModNoMod();
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
yield return currentSet.Single();
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
yield return new MultiMod(currentSet.ToArray());
|
||||
|
||||
|
@ -122,8 +122,10 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
case ScrollEvent _:
|
||||
return false;
|
||||
|
||||
case MouseEvent _:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
{
|
||||
case HitResult.None:
|
||||
break;
|
||||
|
||||
case HitResult.Miss:
|
||||
JudgementBody.ScaleTo(1.6f);
|
||||
JudgementBody.ScaleTo(1, 100, Easing.In);
|
||||
@ -98,6 +99,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
|
||||
this.Delay(600).FadeOut(200);
|
||||
break;
|
||||
|
||||
default:
|
||||
ApplyHitAnimations();
|
||||
break;
|
||||
@ -113,13 +115,17 @@ namespace osu.Game.Rulesets.Judgements
|
||||
case HitResult.Perfect:
|
||||
case HitResult.Great:
|
||||
return colours.Blue;
|
||||
|
||||
case HitResult.Ok:
|
||||
case HitResult.Good:
|
||||
return colours.Green;
|
||||
|
||||
case HitResult.Meh:
|
||||
return colours.Yellow;
|
||||
|
||||
case HitResult.Miss:
|
||||
return colours.Red;
|
||||
|
||||
default:
|
||||
return Color4.White;
|
||||
}
|
||||
|
@ -73,10 +73,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
pitch.PitchAdjust /= lastAdjust;
|
||||
pitch.PitchAdjust *= adjust;
|
||||
break;
|
||||
|
||||
case IHasTempoAdjust tempo:
|
||||
tempo.TempoAdjust /= lastAdjust;
|
||||
tempo.TempoAdjust *= adjust;
|
||||
break;
|
||||
|
||||
default:
|
||||
clock.Rate /= lastAdjust;
|
||||
clock.Rate *= adjust;
|
||||
|
@ -77,6 +77,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
case HitResult.Perfect:
|
||||
case HitResult.Ok:
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@ -126,16 +127,22 @@ namespace osu.Game.Rulesets.Objects
|
||||
{
|
||||
case HitResult.Perfect:
|
||||
return Perfect / 2;
|
||||
|
||||
case HitResult.Great:
|
||||
return Great / 2;
|
||||
|
||||
case HitResult.Good:
|
||||
return Good / 2;
|
||||
|
||||
case HitResult.Ok:
|
||||
return Ok / 2;
|
||||
|
||||
case HitResult.Meh:
|
||||
return Meh / 2;
|
||||
|
||||
case HitResult.Miss:
|
||||
return Miss / 2;
|
||||
|
||||
default:
|
||||
throw new ArgumentException(nameof(result));
|
||||
}
|
||||
|
@ -313,9 +313,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
case HitResult.None:
|
||||
break;
|
||||
|
||||
case HitResult.Miss:
|
||||
Combo.Value = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
Combo.Value++;
|
||||
break;
|
||||
@ -373,6 +375,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
default:
|
||||
case ScoringMode.Standardised:
|
||||
return max_score * (base_portion * baseScore / maxBaseScore + combo_portion * HighestCombo.Value / maxHighestCombo) + bonusScore;
|
||||
|
||||
case ScoringMode.Classic:
|
||||
// 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);
|
||||
|
@ -76,18 +76,22 @@ namespace osu.Game.Rulesets.UI
|
||||
backgroundColour = colours.Yellow;
|
||||
highlightedColour = colours.YellowLight;
|
||||
break;
|
||||
|
||||
case ModType.DifficultyReduction:
|
||||
backgroundColour = colours.Green;
|
||||
highlightedColour = colours.GreenLight;
|
||||
break;
|
||||
|
||||
case ModType.Automation:
|
||||
backgroundColour = colours.Blue;
|
||||
highlightedColour = colours.BlueLight;
|
||||
break;
|
||||
|
||||
case ModType.Conversion:
|
||||
backgroundColour = colours.Purple;
|
||||
highlightedColour = colours.PurpleLight;
|
||||
break;
|
||||
|
||||
case ModType.Fun:
|
||||
backgroundColour = colours.Pink;
|
||||
highlightedColour = colours.PinkLight;
|
||||
|
@ -105,6 +105,7 @@ namespace osu.Game.Rulesets.UI
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case MouseUpEvent mouseUp:
|
||||
if (!CurrentState.Mouse.IsPressed(mouseUp.Button))
|
||||
return false;
|
||||
|
@ -92,9 +92,11 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
case ScrollVisualisationMethod.Sequential:
|
||||
scrollingInfo.Algorithm = new SequentialScrollAlgorithm(controlPoints);
|
||||
break;
|
||||
|
||||
case ScrollVisualisationMethod.Overlapping:
|
||||
scrollingInfo.Algorithm = new OverlappingScrollAlgorithm(controlPoints);
|
||||
break;
|
||||
|
||||
case ScrollVisualisationMethod.Constant:
|
||||
scrollingInfo.Algorithm = new ConstantScrollAlgorithm();
|
||||
break;
|
||||
@ -159,6 +161,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
case GlobalAction.IncreaseScrollSpeed:
|
||||
this.TransformBindableTo(TimeRange, TimeRange.Value - time_span_step, 200, Easing.OutQuint);
|
||||
return true;
|
||||
|
||||
case GlobalAction.DecreaseScrollSpeed:
|
||||
this.TransformBindableTo(TimeRange, TimeRange.Value + time_span_step, 200, Easing.OutQuint);
|
||||
return true;
|
||||
|
@ -72,6 +72,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
case ScrollingDirection.Down:
|
||||
scrollLength = DrawSize.Y;
|
||||
break;
|
||||
|
||||
default:
|
||||
scrollLength = DrawSize.X;
|
||||
break;
|
||||
@ -97,6 +98,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
case ScrollingDirection.Down:
|
||||
hitObject.Height = scrollingInfo.Algorithm.GetLength(hitObject.HitObject.StartTime, endTime.EndTime, timeRange.Value, scrollLength);
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Left:
|
||||
case ScrollingDirection.Right:
|
||||
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:
|
||||
hitObject.Y = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Down:
|
||||
hitObject.Y = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Left:
|
||||
hitObject.X = scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
|
||||
break;
|
||||
|
||||
case ScrollingDirection.Right:
|
||||
hitObject.X = -scrollingInfo.Algorithm.PositionAt(hitObject.HitObject.StartTime, currentTime, timeRange.Value, scrollLength);
|
||||
break;
|
||||
|
@ -41,6 +41,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
case 3:
|
||||
Statistics[HitResult.Great] = value;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Statistics[HitResult.Perfect] = value;
|
||||
break;
|
||||
@ -81,6 +82,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
case 1:
|
||||
Statistics[HitResult.Good] = value;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Statistics[HitResult.Ok] = value;
|
||||
break;
|
||||
|
@ -236,10 +236,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
beatDivisor.Next();
|
||||
OnUserChange(Current.Value);
|
||||
return true;
|
||||
|
||||
case Key.Left:
|
||||
beatDivisor.Previous();
|
||||
OnUserChange(Current.Value);
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -307,18 +309,25 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
case 2:
|
||||
return colours.BlueLight;
|
||||
|
||||
case 4:
|
||||
return colours.Blue;
|
||||
|
||||
case 8:
|
||||
return colours.BlueDarker;
|
||||
|
||||
case 16:
|
||||
return colours.PurpleDark;
|
||||
|
||||
case 3:
|
||||
return colours.YellowLight;
|
||||
|
||||
case 6:
|
||||
return colours.Yellow;
|
||||
|
||||
case 12:
|
||||
return colours.YellowDarker;
|
||||
|
||||
default:
|
||||
return Color4.White;
|
||||
}
|
||||
|
@ -260,6 +260,7 @@ namespace osu.Game.Screens.Menu
|
||||
box.ScaleTo(new Vector2(0, 1), 500, Easing.OutExpo);
|
||||
this.FadeOut(500);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
box.ScaleTo(new Vector2(0, 1), 400, Easing.InSine);
|
||||
this.FadeOut(800);
|
||||
@ -267,11 +268,13 @@ namespace osu.Game.Screens.Menu
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ButtonState.Expanded:
|
||||
const int expand_duration = 500;
|
||||
box.ScaleTo(new Vector2(1, 1), expand_duration, Easing.OutExpo);
|
||||
this.FadeIn(expand_duration / 6f);
|
||||
break;
|
||||
|
||||
case ButtonState.Exploded:
|
||||
const int explode_duration = 200;
|
||||
box.ScaleTo(new Vector2(2, 1), explode_duration, Easing.OutExpo);
|
||||
@ -294,10 +297,12 @@ namespace osu.Game.Screens.Menu
|
||||
case ButtonSystemState.Initial:
|
||||
State = ButtonState.Contracted;
|
||||
break;
|
||||
|
||||
case ButtonSystemState.EnteringMode:
|
||||
ContractStyle = 1;
|
||||
State = ButtonState.Contracted;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (value == VisibleState)
|
||||
State = ButtonState.Expanded;
|
||||
|
@ -57,6 +57,7 @@ namespace osu.Game.Screens.Menu
|
||||
case ButtonSystemState.EnteringMode:
|
||||
State = Visibility.Hidden;
|
||||
break;
|
||||
|
||||
case ButtonSystemState.TopLevel:
|
||||
case ButtonSystemState.Play:
|
||||
State = Visibility.Visible;
|
||||
@ -109,6 +110,7 @@ namespace osu.Game.Screens.Menu
|
||||
case ButtonAreaBackgroundState.Flat:
|
||||
this.ScaleTo(new Vector2(2, 0), 300, Easing.InSine);
|
||||
break;
|
||||
|
||||
case ButtonAreaBackgroundState.Normal:
|
||||
this.ScaleTo(Vector2.One, 400, Easing.OutQuint);
|
||||
break;
|
||||
@ -127,6 +129,7 @@ namespace osu.Game.Screens.Menu
|
||||
default:
|
||||
State = ButtonAreaBackgroundState.Normal;
|
||||
break;
|
||||
|
||||
case ButtonSystemState.Initial:
|
||||
case ButtonSystemState.Exit:
|
||||
case ButtonSystemState.EnteringMode:
|
||||
|
@ -79,6 +79,7 @@ namespace osu.Game.Screens.Menu
|
||||
case ButtonSystemState.Exit:
|
||||
Background.FadeColour(Color4.White, 500, Easing.OutSine);
|
||||
break;
|
||||
|
||||
default:
|
||||
Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine);
|
||||
break;
|
||||
|
@ -221,6 +221,7 @@ namespace osu.Game.Screens.Play
|
||||
else
|
||||
selectionIndex--;
|
||||
return true;
|
||||
|
||||
case Key.Down:
|
||||
if (selectionIndex == -1 || selectionIndex == InternalButtons.Count - 1)
|
||||
selectionIndex = 0;
|
||||
@ -240,6 +241,7 @@ namespace osu.Game.Screens.Play
|
||||
case GlobalAction.Back:
|
||||
BackAction.Invoke();
|
||||
return true;
|
||||
|
||||
case GlobalAction.Select:
|
||||
SelectAction.Invoke();
|
||||
return true;
|
||||
|
@ -25,8 +25,10 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
default:
|
||||
return button.ToString();
|
||||
|
||||
case MouseButton.Left:
|
||||
return @"M1";
|
||||
|
||||
case MouseButton.Right:
|
||||
return @"M2";
|
||||
}
|
||||
|
@ -174,6 +174,7 @@ namespace osu.Game.Screens.Play
|
||||
using (BeginDelayedSequence(1000))
|
||||
scheduledHide = Schedule(() => State = Visibility.Hidden);
|
||||
break;
|
||||
|
||||
case Visibility.Hidden:
|
||||
this.FadeOut(1000, Easing.OutExpo);
|
||||
break;
|
||||
|
@ -38,10 +38,13 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
default:
|
||||
case SortMode.Artist:
|
||||
return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
case SortMode.Title:
|
||||
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
case SortMode.Author:
|
||||
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
case SortMode.Difficulty:
|
||||
return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty);
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
case CarouselItemState.NotSelected:
|
||||
InternalChildren.ForEach(c => c.State.Value = CarouselItemState.Collapsed);
|
||||
break;
|
||||
|
||||
case CarouselItemState.Selected:
|
||||
InternalChildren.ForEach(c =>
|
||||
{
|
||||
|
@ -69,6 +69,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
case CarouselItemState.Selected:
|
||||
updateSelected(item);
|
||||
break;
|
||||
|
||||
case CarouselItemState.NotSelected:
|
||||
case CarouselItemState.Collapsed:
|
||||
attemptSelection();
|
||||
|
@ -106,6 +106,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
case CarouselItemState.NotSelected:
|
||||
Deselected();
|
||||
break;
|
||||
|
||||
case CarouselItemState.Selected:
|
||||
Selected();
|
||||
break;
|
||||
|
@ -108,12 +108,14 @@ namespace osu.Game.Screens.Tournament
|
||||
speedTo(1000f, 200);
|
||||
tracker.FadeOut(100);
|
||||
break;
|
||||
|
||||
case ScrollState.Stopping:
|
||||
speedTo(0f, 2000);
|
||||
tracker.FadeIn(200);
|
||||
|
||||
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Stopped, 2300);
|
||||
break;
|
||||
|
||||
case ScrollState.Stopped:
|
||||
// Find closest to center
|
||||
if (!Children.Any())
|
||||
@ -155,6 +157,7 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Idle, 10000);
|
||||
break;
|
||||
|
||||
case ScrollState.Idle:
|
||||
resetSelected();
|
||||
|
||||
|
@ -26,9 +26,11 @@ namespace osu.Game.Skinning
|
||||
case @"Name":
|
||||
skin.SkinInfo.Name = pair.Value;
|
||||
break;
|
||||
|
||||
case @"Author":
|
||||
skin.SkinInfo.Creator = pair.Value;
|
||||
break;
|
||||
|
||||
case @"CursorExpand":
|
||||
skin.CursorExpand = pair.Value != "0";
|
||||
break;
|
||||
@ -42,6 +44,7 @@ namespace osu.Game.Skinning
|
||||
case "HitCirclePrefix":
|
||||
skin.HitCircleFont = pair.Value;
|
||||
break;
|
||||
|
||||
case "HitCircleOverlap":
|
||||
skin.HitCircleOverlap = int.Parse(pair.Value);
|
||||
break;
|
||||
|
@ -74,9 +74,11 @@ namespace osu.Game.Tests.Visual
|
||||
case ScrollVisualisationMethod.Constant:
|
||||
implementation = new ConstantScrollAlgorithm();
|
||||
break;
|
||||
|
||||
case ScrollVisualisationMethod.Overlapping:
|
||||
implementation = new OverlappingScrollAlgorithm(ControlPoints);
|
||||
break;
|
||||
|
||||
case ScrollVisualisationMethod.Sequential:
|
||||
implementation = new SequentialScrollAlgorithm(ControlPoints);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user