Make commit action abstract

This commit is contained in:
ansel
2023-01-06 22:51:57 +03:00
parent 930cd15649
commit 387326db0d
2 changed files with 10 additions and 15 deletions

View File

@ -118,12 +118,7 @@ namespace osu.Game.Tests.Visual.UserInterface
public bool ButtonLoading => CommitButton.ChildrenOfType<LoadingSpinner>().Single().IsPresent && !CommitButton.ChildrenOfType<SpriteText>().Single().IsPresent;
public TestCommentEditor()
{
OnCommit = onCommit;
}
private void onCommit(string value)
protected override void OnCommit(string value)
{
CommitButton.IsLoadingSpinnerShown = true;
CommittedText = value;
@ -138,6 +133,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private partial class TestCancellableCommentEditor : CancellableCommentEditor
{
public new FillFlowContainer ButtonsContainer => base.ButtonsContainer;
protected override LocalisableString FooterText => @"Wow, another one. Sicc";
public bool Cancelled { get; private set; }
@ -147,6 +143,10 @@ namespace osu.Game.Tests.Visual.UserInterface
OnCancel = () => Cancelled = true;
}
protected override void OnCommit(string text)
{
}
protected override LocalisableString CommitButtonText => @"Save";
protected override LocalisableString TextBoxPlaceholder => @"Multiline textboxes soon";
}