mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 17:52:56 +08:00
Do not hardcode ruleset name in touch device detection toast
This commit is contained in:
parent
a613292802
commit
a78fab0e7d
@ -1,12 +1,14 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Overlays.OSD
|
||||
{
|
||||
public partial class TouchDeviceDetectedToast : Toast
|
||||
{
|
||||
public TouchDeviceDetectedToast()
|
||||
: base("osu!", "Touch device detected", "Touch Device mod applied to score")
|
||||
public TouchDeviceDetectedToast(RulesetInfo ruleset)
|
||||
: base(ruleset.Name, "Touch device detected", "Touch Device mod applied to score")
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Screens.Play
|
||||
// we're kind of assuming that the user just switches to touch for gameplay
|
||||
// and we don't want to spam them with obvious toasts.
|
||||
if (gameplayState.ScoreProcessor.HitEvents.Any(ev => ev.Result.IsHit()))
|
||||
onScreenDisplay?.Display(new TouchDeviceDetectedToast());
|
||||
onScreenDisplay?.Display(new TouchDeviceDetectedToast(gameplayState.Ruleset.RulesetInfo));
|
||||
|
||||
// `Player` (probably rightly so) assumes immutability of mods,
|
||||
// so this will not be shown immediately on the mod display in the top right.
|
||||
|
Loading…
Reference in New Issue
Block a user