1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 17:13:20 +08:00
osu-lazer/osu.Game/Overlays/Comments/Buttons/LoadRepliesButton.cs

36 lines
1006 B
C#
Raw Normal View History

2020-07-11 12:47:17 +08:00
// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Resources.Localisation.Web;
2020-07-11 12:47:17 +08:00
namespace osu.Game.Overlays.Comments.Buttons
{
2022-11-24 13:32:20 +08:00
public partial class LoadRepliesButton : LoadingButton
2020-07-11 12:47:17 +08:00
{
private ButtonContent content;
2020-07-12 17:27:26 +08:00
public LoadRepliesButton()
{
AutoSizeAxes = Axes.Both;
}
protected override Drawable CreateContent() => content = new ButtonContent();
protected override void OnLoadStarted() => content.ToggleTextVisibility(false);
protected override void OnLoadFinished() => content.ToggleTextVisibility(true);
2022-11-24 13:32:20 +08:00
private partial class ButtonContent : CommentRepliesButton
{
public ButtonContent()
{
Text = CommentsStrings.LoadReplies;
}
2020-07-12 17:27:26 +08:00
}
2020-07-11 12:47:17 +08:00
}
}