mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Naming adjustments
This commit is contained in:
@ -6,6 +6,8 @@ using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Comments;
|
||||
using osuTK;
|
||||
@ -23,8 +25,21 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||
|
||||
private readonly OsuSpriteText text;
|
||||
private readonly TestCommentEditor commentEditor;
|
||||
private readonly TestCancellableCommentEditor cancellableCommentEditor;
|
||||
|
||||
public TestSceneCommentEditor()
|
||||
{
|
||||
Add(new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Child = text = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont()
|
||||
}
|
||||
});
|
||||
|
||||
Add(new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
@ -35,12 +50,29 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Spacing = new Vector2(0, 20),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TestCommentEditor(),
|
||||
new TestCancellableCommentEditor()
|
||||
commentEditor = new TestCommentEditor
|
||||
{
|
||||
OnCommit = onCommit
|
||||
},
|
||||
cancellableCommentEditor = new TestCancellableCommentEditor
|
||||
{
|
||||
OnCommit = onCommit
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void onCommit(string value)
|
||||
{
|
||||
text.Text = $@"Invoked text: {value}";
|
||||
|
||||
Scheduler.AddDelayed(() =>
|
||||
{
|
||||
commentEditor.IsLoading = false;
|
||||
cancellableCommentEditor.IsLoading = false;
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private class TestCommentEditor : CommentEditor
|
||||
{
|
||||
protected override string FooterText => @"Footer text. And it is pretty long. Cool.";
|
||||
|
Reference in New Issue
Block a user