mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 15:23:14 +08:00
Reorder members
This commit is contained in:
parent
af0ee9dbd6
commit
472d9274b6
@ -171,11 +171,26 @@ namespace osu.Game.Overlays.Comments
|
||||
private sealed partial class CommitButton : RoundedButton
|
||||
{
|
||||
private const int duration = 200;
|
||||
private bool isLoading;
|
||||
|
||||
private readonly LoadingSpinner spinner;
|
||||
public readonly BindableBool IsBlocked = new BindableBool();
|
||||
private OsuSpriteText text = null!;
|
||||
|
||||
public readonly BindableBool IsBlocked = new BindableBool();
|
||||
|
||||
private bool isLoading;
|
||||
|
||||
public bool IsLoading
|
||||
{
|
||||
get => isLoading;
|
||||
set
|
||||
{
|
||||
isLoading = value;
|
||||
Enabled.Value = !value && !IsBlocked.Value;
|
||||
spinner.FadeTo(value ? 1f : 0f, duration, Easing.OutQuint);
|
||||
text.FadeTo(value ? 0f : 1f, duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
public CommitButton()
|
||||
{
|
||||
Height = 25;
|
||||
@ -207,18 +222,6 @@ namespace osu.Game.Overlays.Comments
|
||||
Margin = new MarginPadding { Horizontal = 20 },
|
||||
};
|
||||
|
||||
public bool IsLoading
|
||||
{
|
||||
get => isLoading;
|
||||
set
|
||||
{
|
||||
isLoading = value;
|
||||
Enabled.Value = !value && !IsBlocked.Value;
|
||||
spinner.FadeTo(value ? 1f : 0f, duration, Easing.OutQuint);
|
||||
text.FadeTo(value ? 0f : 1f, duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
if (!Enabled.Value)
|
||||
|
Loading…
Reference in New Issue
Block a user