diff --git a/osu.Game/Users/Profile/AboutSection.cs b/osu.Game/Users/Profile/AboutSection.cs new file mode 100644 index 0000000000..24a4516441 --- /dev/null +++ b/osu.Game/Users/Profile/AboutSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class AboutSection : ProfileSection + { + public override string Title => "me!"; + + public AboutSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/BeatmapsSection.cs b/osu.Game/Users/Profile/BeatmapsSection.cs new file mode 100644 index 0000000000..1377702c4b --- /dev/null +++ b/osu.Game/Users/Profile/BeatmapsSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class BeatmapsSection : ProfileSection + { + public override string Title => "Beatmaps"; + + public BeatmapsSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/HistoricalSection.cs b/osu.Game/Users/Profile/HistoricalSection.cs new file mode 100644 index 0000000000..751f91e5bc --- /dev/null +++ b/osu.Game/Users/Profile/HistoricalSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class HistoricalSection : ProfileSection + { + public override string Title => "Historical"; + + public HistoricalSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/KudosuSection.cs b/osu.Game/Users/Profile/KudosuSection.cs new file mode 100644 index 0000000000..61986ef5d8 --- /dev/null +++ b/osu.Game/Users/Profile/KudosuSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class KudosuSection : ProfileSection + { + public override string Title => "Kudosu!"; + + public KudosuSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/MedalsSection.cs b/osu.Game/Users/Profile/MedalsSection.cs new file mode 100644 index 0000000000..581d5e897c --- /dev/null +++ b/osu.Game/Users/Profile/MedalsSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class MedalsSection : ProfileSection + { + public override string Title => "Medals"; + + public MedalsSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/ProfileSection.cs b/osu.Game/Users/Profile/ProfileSection.cs index ce362109cc..904b5d77a3 100644 --- a/osu.Game/Users/Profile/ProfileSection.cs +++ b/osu.Game/Users/Profile/ProfileSection.cs @@ -14,5 +14,7 @@ namespace osu.Game.Users.Profile { User = user; } + + public override string ToString() => Title; //for tab control } } diff --git a/osu.Game/Users/Profile/RanksSection.cs b/osu.Game/Users/Profile/RanksSection.cs new file mode 100644 index 0000000000..450c1461e0 --- /dev/null +++ b/osu.Game/Users/Profile/RanksSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class RanksSection : ProfileSection + { + public override string Title => "Ranks"; + + public RanksSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/Profile/RecentSection.cs b/osu.Game/Users/Profile/RecentSection.cs new file mode 100644 index 0000000000..5a4e2707f8 --- /dev/null +++ b/osu.Game/Users/Profile/RecentSection.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Users.Profile +{ + public class RecentSection : ProfileSection + { + public override string Title => "Recent"; + + public RecentSection(User user) : base(user) + { + } + } +} diff --git a/osu.Game/Users/UserProfile.cs b/osu.Game/Users/UserProfile.cs index 55877f248a..eaa89ce42c 100644 --- a/osu.Game/Users/UserProfile.cs +++ b/osu.Game/Users/UserProfile.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; @@ -21,8 +22,22 @@ namespace osu.Game.Users public UserProfile(User user) { this.user = user; - var tab = new OsuTabControl(); - var sections = new ProfileSection[] { }; + var sections = new ProfileSection[] + { + new AboutSection(user), + new RecentSection(user), + new RanksSection(user), + new MedalsSection(user), + new HistoricalSection(user), + new BeatmapsSection(user), + new KudosuSection(user) + }; + var tab = new OsuTabControl + { + RelativeSizeAxes = Axes.X, + Height = 24 + }; + sections.ForEach(tab.AddItem); Add(new Box { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 1e6fd9b6d8..a452192743 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -88,6 +88,13 @@ + + + + + + +