mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Rename loading spinner bool to reflect that it has a setter
This commit is contained in:
parent
d2f4ffcc5b
commit
13b00928c8
@ -120,9 +120,9 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
protected override void OnCommit(string value)
|
||||
{
|
||||
CommitButton.IsLoadingSpinnerShown = true;
|
||||
CommitButton.ShowLoadingSpinner = true;
|
||||
CommittedText = value;
|
||||
Scheduler.AddDelayed(() => CommitButton.IsLoadingSpinnerShown = false, 1000);
|
||||
Scheduler.AddDelayed(() => CommitButton.ShowLoadingSpinner = false, 1000);
|
||||
}
|
||||
|
||||
protected override LocalisableString FooterText => @"Footer text. And it is pretty long. Cool.";
|
||||
|
@ -2,19 +2,19 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Comments
|
||||
{
|
||||
@ -159,17 +159,17 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
public readonly BindableBool IsBlocked = new BindableBool();
|
||||
|
||||
private bool isLoadingSpinnerShown;
|
||||
private bool showLoadingSpinner;
|
||||
|
||||
/// <summary>
|
||||
/// Whether loading spinner shown.
|
||||
/// </summary>
|
||||
public bool IsLoadingSpinnerShown
|
||||
public bool ShowLoadingSpinner
|
||||
{
|
||||
get => isLoadingSpinnerShown;
|
||||
get => showLoadingSpinner;
|
||||
set
|
||||
{
|
||||
isLoadingSpinnerShown = value;
|
||||
showLoadingSpinner = value;
|
||||
Enabled.Value = !value && !IsBlocked.Value;
|
||||
spinner.FadeTo(value ? 1f : 0f, duration, Easing.OutQuint);
|
||||
text.FadeTo(value ? 0f : 1f, duration, Easing.OutQuint);
|
||||
@ -194,7 +194,7 @@ namespace osu.Game.Overlays.Comments
|
||||
base.LoadComplete();
|
||||
IsBlocked.BindValueChanged(e =>
|
||||
{
|
||||
Enabled.Value = !IsLoadingSpinnerShown && !e.NewValue;
|
||||
Enabled.Value = !ShowLoadingSpinner && !e.NewValue;
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user