Remove a lot of customisation from Avatar (and add it in individual usages).

This commit is contained in:
Dean Herbert
2017-03-15 15:22:28 +09:00
parent 7bc0a1fdfe
commit 1ae4c2dfbb
3 changed files with 29 additions and 31 deletions

View File

@ -2,9 +2,13 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.API;
using osu.Game.Users;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Toolbar
{
@ -20,7 +24,20 @@ namespace osu.Game.Overlays.Toolbar
Add(new OpaqueBackground { Depth = 1 });
Flow.Add(avatar = new Avatar());
Flow.Add(avatar = new Avatar
{
Masking = true,
Size = new Vector2(32),
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
CornerRadius = 4,
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Shadow,
Radius = 4,
Colour = Color4.Black.Opacity(0.1f),
}
});
}
[BackgroundDependencyLoader]