mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
address some comments and improve ui
This commit is contained in:
@ -38,8 +38,8 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
|
|
||||||
public MarginPadding Padding
|
public MarginPadding Padding
|
||||||
{
|
{
|
||||||
set => TabContainer.Padding = value;
|
|
||||||
get => TabContainer.Padding;
|
get => TabContainer.Padding;
|
||||||
|
set => TabContainer.Padding = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProfileHeaderTabControl()
|
public ProfileHeaderTabControl()
|
||||||
|
@ -234,6 +234,8 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
{
|
{
|
||||||
Font = "Exo2.0-Regular",
|
Font = "Exo2.0-Regular",
|
||||||
TextSize = 12,
|
TextSize = 12,
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -20,6 +20,7 @@ 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.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
using osu.Game.Overlays.Profile.Header;
|
using osu.Game.Overlays.Profile.Header;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
@ -95,6 +96,9 @@ namespace osu.Game.Overlays.Profile
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private ChatOverlay chatOverlay { get; set; }
|
private ChatOverlay chatOverlay { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private APIAccess apiAccess { get; set; }
|
||||||
|
|
||||||
public ProfileHeader()
|
public ProfileHeader()
|
||||||
{
|
{
|
||||||
Container expandedDetailContainer;
|
Container expandedDetailContainer;
|
||||||
@ -340,6 +344,7 @@ namespace osu.Game.Overlays.Profile
|
|||||||
},
|
},
|
||||||
messageButton = new ProfileHeaderButton
|
messageButton = new ProfileHeaderButton
|
||||||
{
|
{
|
||||||
|
Alpha = 0,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -734,13 +739,16 @@ namespace osu.Game.Overlays.Profile
|
|||||||
|
|
||||||
followerText.Text = user.FollowerCount?.Length > 0 ? user.FollowerCount[0].ToString("#,##0") : "0";
|
followerText.Text = user.FollowerCount?.Length > 0 ? user.FollowerCount[0].ToString("#,##0") : "0";
|
||||||
|
|
||||||
if (!user.PMFriendsOnly)
|
if (!user.PMFriendsOnly && apiAccess.LocalUser.Value.Id != user.Id)
|
||||||
|
{
|
||||||
|
messageButton.Show();
|
||||||
messageButton.Action = () =>
|
messageButton.Action = () =>
|
||||||
{
|
{
|
||||||
channelManager?.OpenPrivateChannel(user);
|
channelManager?.OpenPrivateChannel(user);
|
||||||
userOverlay?.Hide();
|
userOverlay?.Hide();
|
||||||
chatOverlay?.Show();
|
chatOverlay?.Show();
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
expandButton.Action = DetailsVisible.Toggle;
|
expandButton.Action = DetailsVisible.Toggle;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user