mirror of
https://github.com/ppy/osu
synced 2025-01-30 01:42:54 +00:00
Create section classes.
This commit is contained in:
parent
e94d98fa84
commit
e3cdb9f6fe
14
osu.Game/Users/Profile/AboutSection.cs
Normal file
14
osu.Game/Users/Profile/AboutSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
14
osu.Game/Users/Profile/BeatmapsSection.cs
Normal file
14
osu.Game/Users/Profile/BeatmapsSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
14
osu.Game/Users/Profile/HistoricalSection.cs
Normal file
14
osu.Game/Users/Profile/HistoricalSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
14
osu.Game/Users/Profile/KudosuSection.cs
Normal file
14
osu.Game/Users/Profile/KudosuSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
14
osu.Game/Users/Profile/MedalsSection.cs
Normal file
14
osu.Game/Users/Profile/MedalsSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -14,5 +14,7 @@ namespace osu.Game.Users.Profile
|
||||
{
|
||||
User = user;
|
||||
}
|
||||
|
||||
public override string ToString() => Title; //for tab control
|
||||
}
|
||||
}
|
||||
|
14
osu.Game/Users/Profile/RanksSection.cs
Normal file
14
osu.Game/Users/Profile/RanksSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
14
osu.Game/Users/Profile/RecentSection.cs
Normal file
14
osu.Game/Users/Profile/RecentSection.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
// 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.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<ProfileSection>();
|
||||
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<ProfileSection>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 24
|
||||
};
|
||||
sections.ForEach(tab.AddItem);
|
||||
|
||||
Add(new Box
|
||||
{
|
||||
|
@ -88,6 +88,13 @@
|
||||
<Compile Include="Overlays\Settings\SettingsHeader.cs" />
|
||||
<Compile Include="Overlays\Settings\Sections\Audio\MainMenuSettings.cs" />
|
||||
<Compile Include="Overlays\Toolbar\ToolbarChatButton.cs" />
|
||||
<Compile Include="Users\Profile\AboutSection.cs" />
|
||||
<Compile Include="Users\Profile\BeatmapsSection.cs" />
|
||||
<Compile Include="Users\Profile\HistoricalSection.cs" />
|
||||
<Compile Include="Users\Profile\KudosuSection.cs" />
|
||||
<Compile Include="Users\Profile\MedalsSection.cs" />
|
||||
<Compile Include="Users\Profile\RanksSection.cs" />
|
||||
<Compile Include="Users\Profile\RecentSection.cs" />
|
||||
<Compile Include="Users\UserCoverBackground.cs" />
|
||||
<Compile Include="Users\UserProfile.cs" />
|
||||
<Compile Include="Users\Profile\ProfileHeader.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user