1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 02:12:57 +08:00

Merge pull request #1231 from smoogipooo/blending-equations

Update BlendingMode usages to reflect framework changes
This commit is contained in:
Dean Herbert 2017-09-11 15:14:18 +09:00 committed by GitHub
commit 73b5940498
29 changed files with 38 additions and 36 deletions

@ -1 +1 @@
Subproject commit e24d24ae70a78cea5a11635c37d2808d29233e96 Subproject commit cb48c7bef8c5909472c70e09059ee6ea5bf6fc8a

View File

@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Catch.UI
var additive = createCatcherSprite(); var additive = createCatcherSprite();
additive.RelativePositionAxes = Axes.Both; additive.RelativePositionAxes = Axes.Both;
additive.BlendingMode = BlendingMode.Additive; additive.Blending = BlendingMode.Additive;
additive.Position = Position; additive.Position = Position;
additive.Scale = Scale; additive.Scale = Scale;

View File

@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
new Box new Box
{ {
Size = new Vector2(width), Size = new Vector2(width),
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Alpha = 0.5f, Alpha = 0.5f,

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
new TrianglesPiece new TrianglesPiece
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Alpha = 0.5f, Alpha = 0.5f,
} }
}; };

View File

@ -16,14 +16,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
BlendingMode = BlendingMode.Additive; Blending = BlendingMode.Additive;
Alpha = 0; Alpha = 0;
Children = new Drawable[] Children = new Drawable[]
{ {
new TrianglesPiece new TrianglesPiece
{ {
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Alpha = 0.2f, Alpha = 0.2f,
} }

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
BlendingMode = BlendingMode.Additive; Blending = BlendingMode.Additive;
Alpha = 0; Alpha = 0;
Children = new Drawable[] Children = new Drawable[]

View File

@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Alpha = 0.5f Alpha = 0.5f
} }
}; };

View File

@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
this.slider = slider; this.slider = slider;
Masking = true; Masking = true;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
BlendingMode = BlendingMode.Additive; Blending = BlendingMode.Additive;
Origin = Anchor.Centre; Origin = Anchor.Centre;
BorderThickness = 10; BorderThickness = 10;
BorderColour = Color4.Orange; BorderColour = Color4.Orange;

View File

@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
path = new Path path = new Path
{ {
BlendingMode = BlendingMode.None, Blending = BlendingMode.None,
}, },
} }
}, },

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
this.isEnd = isEnd; this.isEnd = isEnd;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
BlendingMode = BlendingMode.Additive; Blending = BlendingMode.Additive;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Children = new Drawable[] Children = new Drawable[]

View File

@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
Origin = Anchor.Centre, Origin = Anchor.Centre,
Alpha = 0, Alpha = 0,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Masking = true, Masking = true,
Children = new[] Children = new[]
{ {
@ -83,7 +83,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Masking = true, Masking = true,
BorderThickness = target_ring_thick_border, BorderThickness = target_ring_thick_border,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box

View File

@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.White, Colour = Color4.White,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Alpha = 0, Alpha = 0,
AlwaysPresent = true AlwaysPresent = true
} }

View File

@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Alpha = 0, Alpha = 0,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
}, },
centre = new Sprite centre = new Sprite
{ {
@ -106,7 +106,7 @@ namespace osu.Game.Rulesets.Taiko.UI
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Size = new Vector2(0.7f), Size = new Vector2(0.7f),
Alpha = 0, Alpha = 0,
BlendingMode = BlendingMode.Additive Blending = BlendingMode.Additive
} }
}; };
} }

View File

@ -97,7 +97,7 @@ namespace osu.Game.Rulesets.Taiko.UI
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit, FillMode = FillMode.Fit,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
}, },
new HitTarget new HitTarget
{ {
@ -126,14 +126,14 @@ namespace osu.Game.Rulesets.Taiko.UI
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit, FillMode = FillMode.Fit,
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET }, Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
BlendingMode = BlendingMode.Additive Blending = BlendingMode.Additive
}, },
judgementContainer = new Container<DrawableTaikoJudgement> judgementContainer = new Container<DrawableTaikoJudgement>
{ {
Name = "Judgements", Name = "Judgements",
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET }, Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
BlendingMode = BlendingMode.Additive Blending = BlendingMode.Additive
}, },
} }
}, },

View File

@ -131,7 +131,7 @@ namespace osu.Game.Graphics.Cursor
}, },
AdditiveLayer = new Sprite AdditiveLayer = new Sprite
{ {
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = colour.Pink, Colour = colour.Pink,
Alpha = 0, Alpha = 0,
Texture = textures.Get(@"Cursor/menu-cursor-additive"), Texture = textures.Get(@"Cursor/menu-cursor-additive"),

View File

@ -99,7 +99,8 @@ namespace osu.Game.Graphics.UserInterface
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, Easing.In); colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, Easing.In);
flash(); flash();
this.Delay(click_duration).Schedule(delegate { this.Delay(click_duration).Schedule(delegate
{
colourContainer.ResizeTo(new Vector2(0.8f, 1f)); colourContainer.ResizeTo(new Vector2(0.8f, 1f));
spriteText.Spacing = Vector2.Zero; spriteText.Spacing = Vector2.Zero;
glowContainer.FadeOut(); glowContainer.FadeOut();
@ -140,7 +141,7 @@ namespace osu.Game.Graphics.UserInterface
colourContainer.Add(flash); colourContainer.Add(flash);
flash.Colour = ButtonColour; flash.Colour = ButtonColour;
flash.BlendingMode = BlendingMode.Additive; flash.Blending = BlendingMode.Additive;
flash.Alpha = 0.3f; flash.Alpha = 0.3f;
flash.FadeOutFromOne(click_duration); flash.FadeOutFromOne(click_duration);
flash.Expire(); flash.Expire();

View File

@ -63,7 +63,7 @@ namespace osu.Game.Graphics.UserInterface
hover = new Box hover = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = Color4.White.Opacity(0.1f), Colour = Color4.White.Opacity(0.1f),
Alpha = 0, Alpha = 0,
}, },

View File

@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Settings
backgroundBox = new Box backgroundBox = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = OsuColour.Gray(60), Colour = OsuColour.Gray(60),
Alpha = 0, Alpha = 0,
}, },

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Toolbar
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(80).Opacity(180), Colour = OsuColour.Gray(80).Opacity(180),
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Alpha = 0, Alpha = 0,
}, },
Flow = new FillFlowContainer Flow = new FillFlowContainer

View File

@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Toolbar
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(150).Opacity(180), Colour = OsuColour.Gray(150).Opacity(180),
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Depth = 2, Depth = 2,
Alpha = 0, Alpha = 0,
}); });

View File

@ -83,7 +83,7 @@ namespace osu.Game.Screens.Menu
{ {
EdgeSmoothness = new Vector2(1.5f, 0), EdgeSmoothness = new Vector2(1.5f, 0),
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = Color4.White, Colour = Color4.White,
Alpha = 0, Alpha = 0,
}, },

View File

@ -52,7 +52,7 @@ namespace osu.Game.Screens.Menu
{ {
Alpha = 0, Alpha = 0,
Triangles = false, Triangles = false,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Interactive = false, Interactive = false,
Colour = Color4.DarkGray, Colour = Color4.DarkGray,
Ripple = false Ripple = false

View File

@ -73,7 +73,7 @@ namespace osu.Game.Screens.Menu
{ {
texture = Texture.WhitePixel; texture = Texture.WhitePixel;
AccentColour = new Color4(1, 1, 1, 0.2f); AccentColour = new Color4(1, 1, 1, 0.2f);
BlendingMode = BlendingMode.Additive; Blending = BlendingMode.Additive;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Menu
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = box_width, Width = box_width,
Alpha = 0, Alpha = 0,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
}, },
rightBox = new Box rightBox = new Box
{ {
@ -59,7 +59,7 @@ namespace osu.Game.Screens.Menu
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = box_width, Width = box_width,
Alpha = 0, Alpha = 0,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
} }
}; };
} }

View File

@ -108,7 +108,7 @@ namespace osu.Game.Screens.Menu
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Alpha = 0 Alpha = 0
} }
} }
@ -169,7 +169,7 @@ namespace osu.Game.Screens.Menu
flashLayer = new Box flashLayer = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = Color4.White, Colour = Color4.White,
Alpha = 0, Alpha = 0,
}, },

View File

@ -100,7 +100,7 @@ namespace osu.Game.Screens
Colour = getColourFor(GetType()), Colour = getColourFor(GetType()),
Alpha = 0.2f, Alpha = 0.2f,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
}, },
textContainer = new FillFlowContainer textContainer = new FillFlowContainer
{ {

View File

@ -304,7 +304,7 @@ namespace osu.Game.Screens.Select.Leaderboards
BlurSigma = new Vector2(4), BlurSigma = new Vector2(4),
CacheDrawnFrameBuffer = true, CacheDrawnFrameBuffer = true,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Size = new Vector2(3f), Size = new Vector2(3f),
Children = new[] Children = new[]
{ {

View File

@ -119,7 +119,7 @@ namespace osu.Game.Screens.Select.Options
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
EdgeSmoothness = new Vector2(1.5f, 0), EdgeSmoothness = new Vector2(1.5f, 0),
BlendingMode = BlendingMode.Additive, Blending = BlendingMode.Additive,
Colour = Color4.White, Colour = Color4.White,
Alpha = 0, Alpha = 0,
}, },

View File

@ -190,6 +190,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD5</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD5</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RGB/@EntryIndexedValue">RGB</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RNG/@EntryIndexedValue">RNG</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RNG/@EntryIndexedValue">RNG</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SHA/@EntryIndexedValue">SHA</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SHA/@EntryIndexedValue">SHA</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SRGB/@EntryIndexedValue">SRGB</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SRGB/@EntryIndexedValue">SRGB</s:String>