mirror of
https://github.com/osukey/osukey.git
synced 2025-07-23 19:30:06 +09:00
Move namespace and setup for DI.
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
@ -15,7 +16,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
var userpage = new UserProfile(new User
|
var userpage = new UserProfileOverlay(new User
|
||||||
{
|
{
|
||||||
Username = @"peppy",
|
Username = @"peppy",
|
||||||
Id = 2,
|
Id = 2,
|
||||||
|
@ -45,6 +45,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
private SocialOverlay social;
|
private SocialOverlay social;
|
||||||
|
|
||||||
|
private UserProfileOverlay userProfile;
|
||||||
|
|
||||||
private Intro intro
|
private Intro intro
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -171,6 +173,7 @@ namespace osu.Game
|
|||||||
LoadComponentAsync(direct = new DirectOverlay { Depth = -1 }, mainContent.Add);
|
LoadComponentAsync(direct = new DirectOverlay { Depth = -1 }, mainContent.Add);
|
||||||
LoadComponentAsync(social = new SocialOverlay { Depth = -1 }, mainContent.Add);
|
LoadComponentAsync(social = new SocialOverlay { Depth = -1 }, mainContent.Add);
|
||||||
LoadComponentAsync(chat = new ChatOverlay { Depth = -1 }, mainContent.Add);
|
LoadComponentAsync(chat = new ChatOverlay { Depth = -1 }, mainContent.Add);
|
||||||
|
LoadComponentAsync(userProfile = new UserProfileOverlay { Depth = -1 }, mainContent.Add);
|
||||||
LoadComponentAsync(settings = new SettingsOverlay { Depth = -1 }, overlayContent.Add);
|
LoadComponentAsync(settings = new SettingsOverlay { Depth = -1 }, overlayContent.Add);
|
||||||
LoadComponentAsync(musicController = new MusicController
|
LoadComponentAsync(musicController = new MusicController
|
||||||
{
|
{
|
||||||
|
@ -6,23 +6,23 @@ using OpenTK;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Users;
|
||||||
using osu.Game.Users.Profile;
|
using osu.Game.Users.Profile;
|
||||||
|
|
||||||
namespace osu.Game.Users
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class UserProfile : FocusedOverlayContainer
|
public class UserProfileOverlay : WaveOverlayContainer
|
||||||
{
|
{
|
||||||
private ProfileSection lastSection;
|
private ProfileSection lastSection;
|
||||||
|
|
||||||
public const float CONTENT_X_MARGIN = 50;
|
public const float CONTENT_X_MARGIN = 50;
|
||||||
|
|
||||||
public UserProfile(User user)
|
public UserProfileOverlay(User user)
|
||||||
{
|
{
|
||||||
var sections = new ProfileSection[]
|
var sections = new ProfileSection[]
|
||||||
{
|
{
|
@ -14,6 +14,7 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Users.Profile
|
namespace osu.Game.Users.Profile
|
||||||
{
|
{
|
||||||
@ -65,7 +66,7 @@ namespace osu.Game.Users.Profile
|
|||||||
Size = new Vector2(avatar_size),
|
Size = new Vector2(avatar_size),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
X = UserProfile.CONTENT_X_MARGIN,
|
X = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
Y = avatar_bottom_position,
|
Y = avatar_bottom_position,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = 5,
|
CornerRadius = 5,
|
||||||
@ -80,7 +81,7 @@ namespace osu.Game.Users.Profile
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
X = UserProfile.CONTENT_X_MARGIN + avatar_size + 10,
|
X = UserProfileOverlay.CONTENT_X_MARGIN + avatar_size + 10,
|
||||||
Y = avatar_bottom_position,
|
Y = avatar_bottom_position,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -111,14 +112,14 @@ namespace osu.Game.Users.Profile
|
|||||||
})
|
})
|
||||||
{
|
{
|
||||||
Y = cover_height + 20,
|
Y = cover_height + 20,
|
||||||
Margin = new MarginPadding { Horizontal = UserProfile.CONTENT_X_MARGIN },
|
Margin = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN },
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
ParagraphSpacing = 1
|
ParagraphSpacing = 1
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
X = -UserProfile.CONTENT_X_MARGIN,
|
X = -UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 280,
|
Width = 280,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Users.Profile
|
namespace osu.Game.Users.Profile
|
||||||
{
|
{
|
||||||
@ -31,7 +32,7 @@ namespace osu.Game.Users.Profile
|
|||||||
Font = @"Exo2.0-RegularItalic",
|
Font = @"Exo2.0-RegularItalic",
|
||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Horizontal = UserProfile.CONTENT_X_MARGIN,
|
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
Vertical = 20
|
Vertical = 20
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -42,7 +43,7 @@ namespace osu.Game.Users.Profile
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Horizontal = UserProfile.CONTENT_X_MARGIN,
|
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||||
Bottom = 20
|
Bottom = 20
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Compile Include="Users\Profile\RanksSection.cs" />
|
<Compile Include="Users\Profile\RanksSection.cs" />
|
||||||
<Compile Include="Users\Profile\RecentSection.cs" />
|
<Compile Include="Users\Profile\RecentSection.cs" />
|
||||||
<Compile Include="Users\UserCoverBackground.cs" />
|
<Compile Include="Users\UserCoverBackground.cs" />
|
||||||
<Compile Include="Users\UserProfile.cs" />
|
<Compile Include="Overlays\UserProfileOverlay.cs" />
|
||||||
<Compile Include="Users\Profile\ProfileHeader.cs" />
|
<Compile Include="Users\Profile\ProfileHeader.cs" />
|
||||||
<Compile Include="Users\Profile\ProfileSection.cs" />
|
<Compile Include="Users\Profile\ProfileSection.cs" />
|
||||||
<Compile Include="Overlays\Toolbar\ToolbarSocialButton.cs" />
|
<Compile Include="Overlays\Toolbar\ToolbarSocialButton.cs" />
|
||||||
|
Reference in New Issue
Block a user