mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Make Toast base class abstract
This commit is contained in:
parent
dd13e2508a
commit
2c62891c48
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
osd.BeginTracking(this, config);
|
||||
Add(osd);
|
||||
|
||||
AddStep("Display empty osd toast", () => osd.Display(new Toast()));
|
||||
AddStep("Display empty osd toast", () => osd.Display(new EmptyToast()));
|
||||
AddRepeatStep("Change toggle (no bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingNoKeybind), 2);
|
||||
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeybind), 2);
|
||||
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeybind), 3);
|
||||
@ -88,6 +88,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Setting4
|
||||
}
|
||||
|
||||
private class EmptyToast : Toast
|
||||
{
|
||||
}
|
||||
|
||||
private class TestOnScreenDisplay : OnScreenDisplay
|
||||
{
|
||||
protected override void DisplayTemporarily(Drawable toDisplay) => toDisplay.FadeIn().ResizeHeightTo(110);
|
||||
|
@ -8,12 +8,12 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.OSD
|
||||
{
|
||||
public class Toast : Container
|
||||
public abstract class Toast : Container
|
||||
{
|
||||
private readonly Container content;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public Toast()
|
||||
protected Toast()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
Loading…
Reference in New Issue
Block a user