mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Update top header container appearance
This commit is contained in:
parent
ff22a91d52
commit
ef7812412b
@ -82,7 +82,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
Username = @"Somebody",
|
Username = @"Somebody",
|
||||||
Id = 1,
|
Id = 1,
|
||||||
CountryCode = CountryCode.Unknown,
|
CountryCode = CountryCode.JP,
|
||||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg",
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg",
|
||||||
JoinDate = DateTimeOffset.Now.AddDays(-1),
|
JoinDate = DateTimeOffset.Now.AddDays(-1),
|
||||||
LastVisit = DateTimeOffset.Now,
|
LastVisit = DateTimeOffset.Now,
|
||||||
@ -143,7 +143,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
Available = 10,
|
Available = 10,
|
||||||
Total = 50
|
Total = 50
|
||||||
}
|
},
|
||||||
|
SupportLevel = 2,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Extensions;
|
|||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Effects;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -22,7 +23,7 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
{
|
{
|
||||||
public partial class TopHeaderContainer : CompositeDrawable
|
public partial class TopHeaderContainer : CompositeDrawable
|
||||||
{
|
{
|
||||||
private const float avatar_size = 110;
|
private const float avatar_size = 120;
|
||||||
|
|
||||||
public readonly Bindable<UserProfileData?> User = new Bindable<UserProfileData?>();
|
public readonly Bindable<UserProfileData?> User = new Bindable<UserProfileData?>();
|
||||||
|
|
||||||
@ -67,60 +68,66 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Margin = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = UserProfileOverlay.CONTENT_X_MARGIN,
|
Left = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
Vertical = 10
|
Vertical = 10
|
||||||
},
|
},
|
||||||
Height = avatar_size,
|
Spacing = new Vector2(20, 0),
|
||||||
|
Height = 85,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
avatar = new UpdateableAvatar(isInteractive: false, showGuestOnNull: false)
|
avatar = new UpdateableAvatar(isInteractive: false, showGuestOnNull: false)
|
||||||
{
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
Size = new Vector2(avatar_size),
|
Size = new Vector2(avatar_size),
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = avatar_size * 0.25f,
|
CornerRadius = avatar_size * 0.25f,
|
||||||
|
EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Offset = new Vector2(0, 1),
|
||||||
|
Radius = 3,
|
||||||
|
Colour = Colour4.Black.Opacity(0.25f),
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new OsuContextMenuContainer
|
new OsuContextMenuContainer
|
||||||
{
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
Child = new Container
|
Child = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Both,
|
||||||
AutoSizeAxes = Axes.X,
|
Direction = FillDirection.Vertical,
|
||||||
Padding = new MarginPadding { Left = 10 },
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(5, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
usernameText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Regular)
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
usernameText = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Regular)
|
|
||||||
},
|
|
||||||
openUserExternally = new ExternalLinkButton
|
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Left = 5 },
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
titleText = new OsuSpriteText
|
supporterTag = new SupporterIcon
|
||||||
{
|
{
|
||||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Regular)
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Height = 15,
|
||||||
|
},
|
||||||
|
openUserExternally = new ExternalLinkButton
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
},
|
},
|
||||||
groupBadgeFlow = new GroupBadgeFlow
|
groupBadgeFlow = new GroupBadgeFlow
|
||||||
{
|
{
|
||||||
@ -129,52 +136,33 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
titleText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular),
|
||||||
|
Margin = new MarginPadding { Bottom = 5 }
|
||||||
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Origin = Anchor.BottomLeft,
|
|
||||||
Anchor = Anchor.BottomLeft,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
supporterTag = new SupporterIcon
|
userFlag = new UpdateableFlag
|
||||||
{
|
{
|
||||||
Height = 20,
|
Size = new Vector2(28, 20),
|
||||||
Margin = new MarginPadding { Top = 5 }
|
ShowPlaceholderOnUnknown = false,
|
||||||
},
|
},
|
||||||
new Box
|
userCountryText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
Font = OsuFont.GetFont(size: 14f, weight: FontWeight.Regular),
|
||||||
Height = 1.5f,
|
Margin = new MarginPadding { Left = 5 },
|
||||||
Margin = new MarginPadding { Top = 10 },
|
Origin = Anchor.CentreLeft,
|
||||||
Colour = colourProvider.Light1,
|
Anchor = Anchor.CentreLeft,
|
||||||
},
|
}
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Margin = new MarginPadding { Top = 5 },
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
userFlag = new UpdateableFlag
|
|
||||||
{
|
|
||||||
Size = new Vector2(28, 20),
|
|
||||||
ShowPlaceholderOnUnknown = false,
|
|
||||||
},
|
|
||||||
userCountryText = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Font = OsuFont.GetFont(size: 17.5f, weight: FontWeight.Regular),
|
|
||||||
Margin = new MarginPadding { Left = 10 },
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Colour = colourProvider.Light1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user