mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 01:17:35 +09: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);
|
osd.BeginTracking(this, config);
|
||||||
Add(osd);
|
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 (no bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingNoKeybind), 2);
|
||||||
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeybind), 2);
|
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeybind), 2);
|
||||||
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeybind), 3);
|
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeybind), 3);
|
||||||
@ -88,6 +88,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Setting4
|
Setting4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class EmptyToast : Toast
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private class TestOnScreenDisplay : OnScreenDisplay
|
private class TestOnScreenDisplay : OnScreenDisplay
|
||||||
{
|
{
|
||||||
protected override void DisplayTemporarily(Drawable toDisplay) => toDisplay.FadeIn().ResizeHeightTo(110);
|
protected override void DisplayTemporarily(Drawable toDisplay) => toDisplay.FadeIn().ResizeHeightTo(110);
|
||||||
|
@ -8,12 +8,12 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.OSD
|
namespace osu.Game.Overlays.OSD
|
||||||
{
|
{
|
||||||
public class Toast : Container
|
public abstract class Toast : Container
|
||||||
{
|
{
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public Toast()
|
protected Toast()
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user