Merge branch 'master' into use-class-rename

This commit is contained in:
Bartłomiej Dach
2021-11-07 15:41:00 +01:00
committed by GitHub
23 changed files with 95 additions and 69 deletions

View File

@ -58,10 +58,9 @@ namespace osu.Game.Graphics.Backgrounds
{
RemoveInternal(Sprite);
AddInternal(bufferedContainer = new BufferedContainer
AddInternal(bufferedContainer = new BufferedContainer(cachedFrameBuffer: true)
{
RelativeSizeAxes = Axes.Both,
CacheDrawnFrameBuffer = true,
RedrawOnScale = false,
Child = Sprite
});

View File

@ -69,12 +69,11 @@ namespace osu.Game.Graphics.Sprites
Children = new Drawable[]
{
new BufferedContainer
new BufferedContainer(cachedFrameBuffer: true)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
BlurSigma = new Vector2(4),
CacheDrawnFrameBuffer = true,
RedrawOnScale = false,
RelativeSizeAxes = Axes.Both,
Blending = BlendingParameters.Additive,

View File

@ -1,7 +1,9 @@
// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osuTK;
@ -22,15 +24,9 @@ namespace osu.Game.Graphics.UserInterface
Enabled.Value = !isLoading;
if (value)
{
loading.Show();
OnLoadStarted();
}
else
{
loading.Hide();
OnLoadFinished();
}
}
}
@ -44,18 +40,34 @@ namespace osu.Game.Graphics.UserInterface
protected LoadingButton()
{
AddRange(new[]
Add(loading = new LoadingSpinner
{
CreateContent(),
loading = new LoadingSpinner
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(12)
}
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(12),
Depth = -1,
});
}
[BackgroundDependencyLoader]
private void load()
{
Add(CreateContent());
}
protected override void LoadComplete()
{
base.LoadComplete();
loading.State.BindValueChanged(s =>
{
if (s.NewValue == Visibility.Visible)
OnLoadStarted();
else
OnLoadFinished();
}, true);
}
protected override bool OnClick(ClickEvent e)
{
if (!Enabled.Value)