1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Set content in profile sections.

This commit is contained in:
Huo Yaoyuan 2017-06-09 14:53:00 +08:00
parent c31dd7a480
commit 5a0bd3b695
9 changed files with 37 additions and 13 deletions

View File

@ -94,7 +94,8 @@ namespace osu.Game.Graphics.Containers
=> new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
};
private List<Drawable> sections = new List<Drawable>();
@ -133,7 +134,7 @@ namespace osu.Game.Graphics.Containers
Add(ScrollContainer = new ScrollContainer()
{
RelativeSizeAxes = Axes.Both,
Masking = false,
Masking = true,
Children = new Drawable[] { sectionsContainer = CreateScrollContentContainer() },
Depth = float.MaxValue
});

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "me!";
public AboutSection(User user) : base(user)
public AboutSection(User user)
{
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Beatmaps";
public BeatmapsSection(User user) : base(user)
public BeatmapsSection(User user)
{
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Historical";
public HistoricalSection(User user) : base(user)
public HistoricalSection(User user)
{
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Kudosu!";
public KudosuSection(User user) : base(user)
public KudosuSection(User user)
{
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Medals";
public MedalsSection(User user) : base(user)
public MedalsSection(User user)
{
}
}

View File

@ -1,18 +1,41 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Users.Profile
{
public abstract class ProfileSection : Container
public abstract class ProfileSection : FillFlowContainer
{
protected readonly User User;
public abstract string Title { get; }
protected ProfileSection(User user)
protected ProfileSection()
{
User = user;
Margin = new MarginPadding { Horizontal = UserProfile.CONTENT_X_MARGIN };
Direction = FillDirection.Vertical;
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
Children = new Drawable[]
{
new OsuSpriteText
{
Text = Title,
TextSize = 16,
Font = @"Exo2.0-RegularItalic",
Margin = new MarginPadding { Vertical = 20 }
},
new Box
{
RelativeSizeAxes = Axes.X,
Height = 1,
Colour = OsuColour.Gray(34),
Depth = float.MinValue
}
};
}
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Ranks";
public RanksSection(User user) : base(user)
public RanksSection(User user)
{
}
}

View File

@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
{
public override string Title => "Recent";
public RecentSection(User user) : base(user)
public RecentSection(User user)
{
}
}