mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 03:22:57 +08:00
Update usages of BufferedContainer
in line with framework changes
This commit is contained in:
parent
9b5ed791b5
commit
6399c695e8
@ -86,20 +86,18 @@ namespace osu.Game.Rulesets.Mania.Skinning.Default
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChild = foregroundBuffer = new BufferedContainer
|
||||
InternalChild = foregroundBuffer = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
Blending = BlendingParameters.Additive,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CacheDrawnFrameBuffer = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box { RelativeSizeAxes = Axes.Both },
|
||||
subtractionBuffer = new BufferedContainer
|
||||
subtractionBuffer = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
// This is needed because we're blending with another object
|
||||
BackgroundColour = Color4.White.Opacity(0),
|
||||
CacheDrawnFrameBuffer = true,
|
||||
// The 'hole' is achieved by subtracting the result of this container with the parent
|
||||
Blending = new BlendingParameters { AlphaEquation = BlendingEquation.ReverseSubtract },
|
||||
Child = subtractionLayer = new CircularContainer
|
||||
|
@ -136,10 +136,9 @@ namespace osu.Game.Rulesets.Osu.Statistics
|
||||
}
|
||||
}
|
||||
},
|
||||
bufferedGrid = new BufferedContainer
|
||||
bufferedGrid = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CacheDrawnFrameBuffer = true,
|
||||
BackgroundColour = Color4Extensions.FromHex("#202624").Opacity(0),
|
||||
Child = pointGrid = new GridContainer
|
||||
{
|
||||
|
@ -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
|
||||
});
|
||||
|
@ -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,
|
||||
|
@ -366,14 +366,13 @@ namespace osu.Game.Overlays
|
||||
private readonly WorkingBeatmap beatmap;
|
||||
|
||||
public Background(WorkingBeatmap beatmap = null)
|
||||
: base(cachedFrameBuffer: true)
|
||||
{
|
||||
this.beatmap = beatmap;
|
||||
|
||||
Depth = float.MaxValue;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
CacheDrawnFrameBuffer = true;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
sprite = new Sprite
|
||||
|
@ -393,6 +393,7 @@ namespace osu.Game.Screens.Menu
|
||||
public class OutlineTriangle : BufferedContainer
|
||||
{
|
||||
public OutlineTriangle(bool outlineOnly, float size)
|
||||
: base(cachedFrameBuffer: true)
|
||||
{
|
||||
Size = new Vector2(size);
|
||||
|
||||
@ -414,7 +415,6 @@ namespace osu.Game.Screens.Menu
|
||||
}
|
||||
|
||||
Blending = BlendingParameters.Additive;
|
||||
CacheDrawnFrameBuffer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,9 +32,9 @@ namespace osu.Game.Screens.Play.Break
|
||||
}
|
||||
|
||||
public BlurredIcon()
|
||||
: base(cachedFrameBuffer: true)
|
||||
{
|
||||
RelativePositionAxes = Axes.X;
|
||||
CacheDrawnFrameBuffer = true;
|
||||
Child = icon = new SpriteIcon
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -98,9 +98,8 @@ namespace osu.Game.Screens.Play
|
||||
/// </summary>
|
||||
protected virtual void RecreateGraph()
|
||||
{
|
||||
var newColumns = new BufferedContainer<Column>
|
||||
var newColumns = new BufferedContainer<Column>(cachedFrameBuffer: true)
|
||||
{
|
||||
CacheDrawnFrameBuffer = true,
|
||||
RedrawOnScale = false,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
|
@ -51,13 +51,12 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
Font = OsuFont.Numeric.With(size: 76),
|
||||
UseFullGlyphHeight = false
|
||||
},
|
||||
superFlash = new BufferedContainer
|
||||
superFlash = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
BlurSigma = new Vector2(85),
|
||||
Size = new Vector2(600),
|
||||
CacheDrawnFrameBuffer = true,
|
||||
Blending = BlendingParameters.Additive,
|
||||
Alpha = 0,
|
||||
Children = new[]
|
||||
@ -71,14 +70,13 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
},
|
||||
},
|
||||
},
|
||||
flash = new BufferedContainer
|
||||
flash = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
BlurSigma = new Vector2(35),
|
||||
BypassAutoSizeAxes = Axes.Both,
|
||||
Size = new Vector2(200),
|
||||
CacheDrawnFrameBuffer = true,
|
||||
Blending = BlendingParameters.Additive,
|
||||
Alpha = 0,
|
||||
Scale = new Vector2(1.8f),
|
||||
|
@ -27,9 +27,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
InternalChild = new BufferedContainer
|
||||
InternalChild = new BufferedContainer(cachedFrameBuffer: true)
|
||||
{
|
||||
CacheDrawnFrameBuffer = true,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -15,8 +15,8 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
public class SetPanelBackground : BufferedContainer
|
||||
{
|
||||
public SetPanelBackground(WorkingBeatmap working)
|
||||
: base(cachedFrameBuffer: true)
|
||||
{
|
||||
CacheDrawnFrameBuffer = true;
|
||||
RedrawOnScale = false;
|
||||
|
||||
Children = new Drawable[]
|
||||
|
Loading…
Reference in New Issue
Block a user