1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Merge branch 'master' into profile

This commit is contained in:
Huo Yaoyuan 2017-06-12 14:40:42 +08:00
commit e311ac612c
44 changed files with 61 additions and 184 deletions

@ -1 +1 @@
Subproject commit 2be02764ab5b27c3e85ae4997cdb4215e59a801b
Subproject commit 83ee0bf59995a4399dd7c2ee676cdac6ac1669f8

View File

@ -70,7 +70,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
base.AccentColour = value;
glowContainer.EdgeEffect = new EdgeEffect
glowContainer.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = 2f,

View File

@ -171,14 +171,14 @@ namespace osu.Game.Rulesets.Mania.UI
background.Colour = accentColour;
hitTargetBar.EdgeEffect = new EdgeEffect
hitTargetBar.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = 5,
Colour = accentColour.Opacity(0.5f),
};
keyIcon.EdgeEffect = new EdgeEffect
keyIcon.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = 5,

View File

@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
Masking = true;
AutoSizeAxes = Axes.Both;
CornerRadius = width / 2;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
Masking = true,
Origin = Anchor.Centre,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = 60,

View File

@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
Disc.Colour = value;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Hollow = true,
Type = EdgeEffectType.Glow,

View File

@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
Colour = Color4.Black,
Alpha = 0.4f,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = 10,

View File

@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
private void resetEdgeEffects()
{
background.EdgeEffect = new EdgeEffect
background.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = AccentColour.Opacity(KiaiMode ? edge_alpha_kiai : 1f),

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Taiko.UI
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = isRim ? colours.BlueDarker : colours.PinkDarker,

View File

@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Taiko.UI
RelativeSizeAxes = Axes.Both,
BorderThickness = 2,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),

View File

@ -88,7 +88,7 @@ namespace osu.Game.Beatmaps.Drawables
protected virtual void Selected()
{
nestedContainer.BorderThickness = 2.5f;
nestedContainer.EdgeEffect = new EdgeEffect
nestedContainer.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150),
@ -100,7 +100,7 @@ namespace osu.Game.Beatmaps.Drawables
protected virtual void Deselected()
{
nestedContainer.BorderThickness = 0;
nestedContainer.EdgeEffect = new EdgeEffect
nestedContainer.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Offset = new Vector2(1),

View File

@ -67,7 +67,7 @@ namespace osu.Game.Graphics.Cursor
Masking = true,
BorderThickness = Size.X / 6,
BorderColour = Color4.White,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Pink.Opacity(0.5f),

View File

@ -1,129 +0,0 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transforms;
using osu.Framework.Input;
using osu.Game.Configuration;
using System;
namespace osu.Game.Graphics.Cursor
{
public class OsuCursorContainer : CursorContainer
{
protected override Drawable CreateCursor() => new OsuCursor();
public OsuCursorContainer()
{
Add(new CursorTrail { Depth = 1 });
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
ActiveCursor.Scale = new Vector2(1);
ActiveCursor.ScaleTo(1.2f, 100, EasingTypes.OutQuad);
return base.OnMouseDown(state, args);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
if (!state.Mouse.HasMainButtonPressed)
ActiveCursor.ScaleTo(1, 200, EasingTypes.OutQuad);
return base.OnMouseUp(state, args);
}
public class OsuCursor : Container
{
private Container cursorContainer;
private Bindable<double> cursorScale;
public OsuCursor()
{
Origin = Anchor.Centre;
Size = new Vector2(42);
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
cursorScale = config.GetBindable<double>(OsuConfig.CursorSize);
Children = new Drawable[]
{
cursorContainer = new CircularContainer
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Scale = new Vector2((float)cursorScale),
Masking = true,
BorderThickness = Size.X / 6,
BorderColour = Color4.White,
EdgeEffect = new EdgeEffect {
Type = EdgeEffectType.Shadow,
Colour = Color4.Pink.Opacity(0.5f),
Radius = 5,
},
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true,
},
new CircularContainer
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Masking = true,
BorderThickness = Size.X / 3,
BorderColour = Color4.White.Opacity(0.5f),
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true,
},
},
},
new CircularContainer
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.1f),
Masking = true,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.White,
},
},
},
}
},
};
cursorScale.ValueChanged += scaleChanged;
}
private void scaleChanged(object sender, EventArgs e)
{
cursorContainer.Scale = new Vector2((float)cursorScale);
}
}
}
}

View File

@ -52,7 +52,7 @@ namespace osu.Game.Graphics.Cursor
CornerRadius = 5;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),

View File

@ -222,7 +222,7 @@ namespace osu.Game.Graphics.UserInterface
Width = 0.8f,
Masking = true,
MaskingSmoothness = 2,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),

View File

@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
CornerRadius = 5,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.04f),
Type = EdgeEffectType.Shadow,

View File

@ -56,7 +56,7 @@ namespace osu.Game.Graphics.UserInterface
GlowingAccentColour = colours.PinkLighter;
GlowColour = colours.PinkDarker;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = GlowColour,
Type = EdgeEffectType.Glow,

View File

@ -79,18 +79,21 @@ namespace osu.Game.Graphics.UserInterface
Width = 0.4f,
Children = new Drawable[]
{
new Container {
new Container
{
RelativeSizeAxes = Axes.Both,
Shear = new Vector2(shear, 0),
Masking = true,
MaskingSmoothness = 2,
EdgeEffect = new EdgeEffect {
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),
Offset = new Vector2(2, 0),
Radius = 2,
},
Children = new[] {
Children = new[]
{
IconLayer = new Box
{
RelativeSizeAxes = Axes.Both,
@ -113,18 +116,21 @@ namespace osu.Game.Graphics.UserInterface
Width = 0.6f,
Children = new Drawable[]
{
new Container {
new Container
{
RelativeSizeAxes = Axes.Both,
Shear = new Vector2(shear, 0),
Masking = true,
MaskingSmoothness = 2,
EdgeEffect = new EdgeEffect {
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),
Offset = new Vector2(2, 0),
Radius = 2,
},
Children = new[] {
Children = new[]
{
TextLayer = new Box
{
Origin = Anchor.TopLeft,

View File

@ -141,7 +141,7 @@ namespace osu.Game.Overlays.Chat
Shear = new Vector2(shear_width / ChatOverlay.TAB_AREA_HEIGHT, 0);
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Radius = 10,

View File

@ -145,7 +145,7 @@ namespace osu.Game.Overlays.Dialog
{
RelativeSizeAxes = Axes.Both,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.5f),

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Direct
CornerRadius = 4;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Offset = new Vector2(0f, 1f),

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Direct
Height = height;
CornerRadius = 5;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Offset = new Vector2(0f, 1f),

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Music
Icon.TextSize = 14;
Icon.Margin = new MarginPadding(0);
Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 10, Right = 10 };
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.3f),
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Music
public CollectionsMenu()
{
CornerRadius = 5;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.3f),

View File

@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Music
RelativeSizeAxes = Axes.Both,
CornerRadius = 5,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),

View File

@ -106,7 +106,7 @@ namespace osu.Game.Overlays
Height = player_height,
Masking = true,
CornerRadius = 5,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),

View File

@ -238,7 +238,7 @@ namespace osu.Game.Overlays.Notifications
set
{
base.Colour = value;
pulsateLayer.EdgeEffect = new EdgeEffect
pulsateLayer.EdgeEffect = new EdgeEffectParameters
{
Colour = ((Color4)value).Opacity(0.5f), //todo: avoid cast
Type = EdgeEffectType.Glow,

View File

@ -253,7 +253,7 @@ namespace osu.Game.Overlays
Masking = true;
CornerRadius = 3;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = colours.BlueDark.Opacity(glow_strength),
Type = EdgeEffectType.Glow,

View File

@ -290,7 +290,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
Margin = new MarginPadding { Bottom = 5 };
Masking = true;
CornerRadius = 5;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.25f),
@ -326,7 +326,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
CornerRadius = 5;
ItemsContainer.Padding = new MarginPadding(0);
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.25f),

View File

@ -172,7 +172,7 @@ namespace osu.Game.Overlays.Toolbar
RelativeSizeAxes = Axes.Both;
Masking = true;
MaskingSmoothness = 0;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Toolbar
{
DrawableIcon.Colour = Color4.White;
DrawableIcon.Masking = true;
DrawableIcon.EdgeEffect = new EdgeEffect
DrawableIcon.EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = new Color4(255, 194, 224, 100),

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.BottomLeft,
Origin = Anchor.TopLeft,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = new Color4(255, 194, 224, 100),

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
CornerRadius = 4,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Radius = 4,

View File

@ -173,7 +173,7 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.X;
Width = 1.5f;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(50),

View File

@ -54,7 +54,7 @@ namespace osu.Game.Screens.Menu
{
Masking = true,
MaskingSmoothness = 2,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),

View File

@ -47,7 +47,7 @@ namespace osu.Game.Screens.Multiplayer
Height = height;
CornerRadius = 5;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),

View File

@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play.HUD
return;
glowColour = value;
fill.EdgeEffect = new EdgeEffect
fill.EdgeEffect = new EdgeEffectParameters
{
Colour = glowColour.Opacity(base_glow_opacity),
Radius = 8,

View File

@ -164,7 +164,7 @@ namespace osu.Game.Screens.Play
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.6f),

View File

@ -60,7 +60,7 @@ namespace osu.Game.Screens.Ranking
activeColour = colours.PinkDarker;
inactiveColour = OsuColour.Gray(0.8f);
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,

View File

@ -134,7 +134,7 @@ namespace osu.Game.Screens.Ranking
circleOuter = new CircularContainer
{
Size = new Vector2(circle_outer_scale),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,
@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking
circleInner = new CircularContainer
{
Size = new Vector2(0.6f),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Ranking
},
new CircularContainer
{
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = colours.GrayF.Opacity(0.8f),
Type = EdgeEffectType.Shadow,
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Ranking
},
content = new CircularContainer
{
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.2f),
Type = EdgeEffectType.Shadow,

View File

@ -36,7 +36,7 @@ namespace osu.Game.Screens.Select
Masking = true;
BorderColour = new Color4(221, 255, 255, 255);
BorderThickness = 2.5f;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150),

View File

@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select.Leaderboards
CornerRadius = corner_radius,
Masking = true,
OnLoadComplete = d => d.FadeInFromZero(200),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Radius = 1,

View File

@ -99,7 +99,7 @@ namespace osu.Game.Screens.Select.Options
RelativeSizeAxes = Axes.Both,
Shear = new Vector2(0.2f, 0f),
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),

View File

@ -33,7 +33,7 @@ namespace osu.Game.Users
Height = height - status_height;
Masking = true;
CornerRadius = 5;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.25f),
@ -67,7 +67,7 @@ namespace osu.Game.Users
User = user,
Masking = true,
CornerRadius = 5,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.25f),