mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 16:02:56 +08:00
Set content in profile sections.
This commit is contained in:
parent
c31dd7a480
commit
5a0bd3b695
@ -94,7 +94,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
=> new FillFlowContainer
|
=> new FillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
AutoSizeAxes = Axes.Both
|
AutoSizeAxes = Axes.Y,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
};
|
};
|
||||||
|
|
||||||
private List<Drawable> sections = new List<Drawable>();
|
private List<Drawable> sections = new List<Drawable>();
|
||||||
@ -133,7 +134,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
Add(ScrollContainer = new ScrollContainer()
|
Add(ScrollContainer = new ScrollContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Masking = false,
|
Masking = true,
|
||||||
Children = new Drawable[] { sectionsContainer = CreateScrollContentContainer() },
|
Children = new Drawable[] { sectionsContainer = CreateScrollContentContainer() },
|
||||||
Depth = float.MaxValue
|
Depth = float.MaxValue
|
||||||
});
|
});
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "me!";
|
public override string Title => "me!";
|
||||||
|
|
||||||
public AboutSection(User user) : base(user)
|
public AboutSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Beatmaps";
|
public override string Title => "Beatmaps";
|
||||||
|
|
||||||
public BeatmapsSection(User user) : base(user)
|
public BeatmapsSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Historical";
|
public override string Title => "Historical";
|
||||||
|
|
||||||
public HistoricalSection(User user) : base(user)
|
public HistoricalSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Kudosu!";
|
public override string Title => "Kudosu!";
|
||||||
|
|
||||||
public KudosuSection(User user) : base(user)
|
public KudosuSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Medals";
|
public override string Title => "Medals";
|
||||||
|
|
||||||
public MedalsSection(User user) : base(user)
|
public MedalsSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,41 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// 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.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Users.Profile
|
namespace osu.Game.Users.Profile
|
||||||
{
|
{
|
||||||
public abstract class ProfileSection : Container
|
public abstract class ProfileSection : FillFlowContainer
|
||||||
{
|
{
|
||||||
protected readonly User User;
|
|
||||||
public abstract string Title { get; }
|
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
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Ranks";
|
public override string Title => "Ranks";
|
||||||
|
|
||||||
public RanksSection(User user) : base(user)
|
public RanksSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
public override string Title => "Recent";
|
public override string Title => "Recent";
|
||||||
|
|
||||||
public RecentSection(User user) : base(user)
|
public RecentSection(User user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user