mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Rename Masking to ClampToDrawable
This commit is contained in:
parent
e003ecb593
commit
1393f52b2b
@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
{
|
||||
TriangleScale = 1.2f;
|
||||
HideAlphaDiscrepancies = false;
|
||||
Masking = false;
|
||||
ClampToDrawable = false;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
|
||||
AddSliderStep("Triangle scale", 0f, 10f, 1f, s => triangles.TriangleScale = s);
|
||||
AddSliderStep("Seed", 0, 1000, 0, s => triangles.Reset(s));
|
||||
AddToggleStep("Masking", m => triangles.Masking = m);
|
||||
AddToggleStep("ClampToDrawable", c => triangles.ClampToDrawable = c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
AddStep("White colour", () => box.Colour = triangles.Colour = maskedTriangles.Colour = Color4.White);
|
||||
AddStep("Vertical gradient", () => box.Colour = triangles.Colour = maskedTriangles.Colour = ColourInfo.GradientVertical(Color4.White, Color4.Red));
|
||||
AddStep("Horizontal gradient", () => box.Colour = triangles.Colour = maskedTriangles.Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.Red));
|
||||
AddToggleStep("Masking", m => maskedTriangles.Masking = m);
|
||||
AddToggleStep("ClampToDrawable", c => maskedTriangles.ClampToDrawable = c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
/// If enabled, only the portion of triangles that falls within this <see cref="Drawable"/>'s
|
||||
/// shape is drawn to the screen. Default is true.
|
||||
/// </summary>
|
||||
public bool Masking { get; set; } = true;
|
||||
public bool ClampToDrawable { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether we should drop-off alpha values of triangles more quickly to improve
|
||||
@ -257,7 +257,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
|
||||
private IShader shader;
|
||||
private Texture texture;
|
||||
private bool masking;
|
||||
private bool clamp;
|
||||
|
||||
private readonly List<TriangleParticle> parts = new List<TriangleParticle>();
|
||||
private readonly Vector2 triangleSize = new Vector2(1f, equilateral_triangle_ratio) * triangle_size;
|
||||
@ -276,7 +276,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
shader = Source.shader;
|
||||
texture = Source.texture;
|
||||
size = Source.DrawSize;
|
||||
masking = Source.Masking;
|
||||
clamp = Source.ClampToDrawable;
|
||||
|
||||
parts.Clear();
|
||||
parts.AddRange(Source.parts);
|
||||
@ -306,7 +306,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
|
||||
Vector2 topLeft = particle.Position - new Vector2(relativeSize.X * 0.5f, 0f);
|
||||
|
||||
Quad triangleQuad = masking ? clampToDrawable(topLeft, relativeSize) : new Quad(topLeft.X, topLeft.Y, relativeSize.X, relativeSize.Y);
|
||||
Quad triangleQuad = clamp ? clampToDrawable(topLeft, relativeSize) : new Quad(topLeft.X, topLeft.Y, relativeSize.X, relativeSize.Y);
|
||||
|
||||
var drawQuad = new Quad(
|
||||
Vector2Extensions.Transform(triangleQuad.TopLeft * size, DrawInfo.Matrix),
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
/// If enabled, only the portion of triangles that falls within this <see cref="Drawable"/>'s
|
||||
/// shape is drawn to the screen. Default is true.
|
||||
/// </summary>
|
||||
public bool Masking { get; set; } = true;
|
||||
public bool ClampToDrawable { get; set; } = true;
|
||||
|
||||
private readonly BindableFloat spawnRatio = new BindableFloat(1f);
|
||||
|
||||
@ -193,7 +193,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
private Vector2 size;
|
||||
private float thickness;
|
||||
private float texelSize;
|
||||
private bool masking;
|
||||
private bool clamp;
|
||||
|
||||
public TrianglesDrawNode(TrianglesV2 source)
|
||||
: base(source)
|
||||
@ -208,7 +208,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
texture = Source.texture;
|
||||
size = Source.DrawSize;
|
||||
thickness = Source.Thickness;
|
||||
masking = Source.Masking;
|
||||
clamp = Source.ClampToDrawable;
|
||||
|
||||
Quad triangleQuad = new Quad(
|
||||
Vector2Extensions.Transform(Vector2.Zero, DrawInfo.Matrix),
|
||||
@ -248,7 +248,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
{
|
||||
Vector2 topLeft = particle.Position - new Vector2(relativeSize.X * 0.5f, 0f);
|
||||
|
||||
Quad triangleQuad = masking ? clampToDrawable(topLeft, relativeSize) : new Quad(topLeft.X, topLeft.Y, relativeSize.X, relativeSize.Y);
|
||||
Quad triangleQuad = clamp ? clampToDrawable(topLeft, relativeSize) : new Quad(topLeft.X, topLeft.Y, relativeSize.X, relativeSize.Y);
|
||||
|
||||
var drawQuad = new Quad(
|
||||
Vector2Extensions.Transform(triangleQuad.TopLeft * size, DrawInfo.Matrix),
|
||||
|
@ -150,7 +150,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
TriangleScale = 4,
|
||||
ColourDark = OsuColour.Gray(0.88f),
|
||||
Shear = new Vector2(-0.2f, 0),
|
||||
Masking = false
|
||||
ClampToDrawable = false
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Height = header_height,
|
||||
Shear = new Vector2(-ShearedOverlayContainer.SHEAR, 0),
|
||||
Velocity = 0.7f,
|
||||
Masking = false
|
||||
ClampToDrawable = false
|
||||
},
|
||||
headerText = new OsuTextFlowContainer(t =>
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
TriangleScale = 2,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ColourLight = Color4Extensions.FromHex(@"3a7285"),
|
||||
ColourDark = Color4Extensions.FromHex(@"123744"),
|
||||
ColourDark = Color4Extensions.FromHex(@"123744")
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user