mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 20:57:28 +09:00
Update some container structure.
This commit is contained in:
parent
fa98cfa9e5
commit
a08d35ec4c
@ -28,7 +28,7 @@ namespace osu.Game.Users.Profile
|
|||||||
private readonly SpriteText levelText;
|
private readonly SpriteText levelText;
|
||||||
private readonly GradeBadge gradeSSPlus, gradeSS, gradeSPlus, gradeS, gradeA;
|
private readonly GradeBadge gradeSSPlus, gradeSS, gradeSPlus, gradeS, gradeA;
|
||||||
|
|
||||||
private const float cover_height = 350, info_height = 150, info_width = 250, avatar_size = 110, avatar_bottom_position = -20, level_position = 30, level_height = 60;
|
private const float cover_height = 350, info_height = 150, info_width = 250, avatar_size = 110, level_position = 30, level_height = 60;
|
||||||
public ProfileHeader(User user)
|
public ProfileHeader(User user)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
@ -47,14 +47,21 @@ namespace osu.Game.Users.Profile
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ColourInfo = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f))
|
ColourInfo = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f))
|
||||||
},
|
},
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
X = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
|
Y = -20,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
new UpdateableAvatar
|
new UpdateableAvatar
|
||||||
{
|
{
|
||||||
User = user,
|
User = user,
|
||||||
Size = new Vector2(avatar_size),
|
Size = new Vector2(avatar_size),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
X = UserProfileOverlay.CONTENT_X_MARGIN,
|
|
||||||
Y = avatar_bottom_position,
|
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = 5,
|
CornerRadius = 5,
|
||||||
EdgeEffect = new EdgeEffectParameters
|
EdgeEffect = new EdgeEffectParameters
|
||||||
@ -68,8 +75,8 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
X = UserProfileOverlay.CONTENT_X_MARGIN + avatar_size + 10,
|
X = avatar_size + 10,
|
||||||
Y = avatar_bottom_position,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
@ -92,6 +99,8 @@ namespace osu.Game.Users.Profile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
infoTextLeft = new OsuTextFlowContainer(t =>
|
infoTextLeft = new OsuTextFlowContainer(t =>
|
||||||
{
|
{
|
||||||
t.TextSize = 14;
|
t.TextSize = 14;
|
||||||
@ -108,7 +117,7 @@ namespace osu.Game.Users.Profile
|
|||||||
infoTextRight = new OsuTextFlowContainer(t =>
|
infoTextRight = new OsuTextFlowContainer(t =>
|
||||||
{
|
{
|
||||||
t.TextSize = 14;
|
t.TextSize = 14;
|
||||||
t.Alpha = 0.8f;
|
t.Font = @"Exo2.0-RegularItalic";
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
|
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
|
||||||
@ -349,11 +358,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(str)) return;
|
if (string.IsNullOrEmpty(str)) return;
|
||||||
infoTextRight.AddTextAwesome(icon);
|
infoTextRight.AddTextAwesome(icon);
|
||||||
infoTextRight.AddText(" " + str, t =>
|
infoTextRight.AddText(" " + str);
|
||||||
{
|
|
||||||
t.Font = @"Exo2.0-RegularItalic";
|
|
||||||
t.Alpha = 1;
|
|
||||||
});
|
|
||||||
infoTextRight.NewLine();
|
infoTextRight.NewLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user