mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +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
|
||||
{
|
||||
set => TabContainer.Padding = value;
|
||||
get => TabContainer.Padding;
|
||||
set => TabContainer.Padding = value;
|
||||
}
|
||||
|
||||
public ProfileHeaderTabControl()
|
||||
|
@ -234,6 +234,8 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
{
|
||||
Font = "Exo2.0-Regular",
|
||||
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.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Overlays.Profile.Header;
|
||||
using osu.Game.Scoring;
|
||||
@ -95,6 +96,9 @@ namespace osu.Game.Overlays.Profile
|
||||
[Resolved(CanBeNull = true)]
|
||||
private ChatOverlay chatOverlay { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private APIAccess apiAccess { get; set; }
|
||||
|
||||
public ProfileHeader()
|
||||
{
|
||||
Container expandedDetailContainer;
|
||||
@ -340,6 +344,7 @@ namespace osu.Game.Overlays.Profile
|
||||
},
|
||||
messageButton = new ProfileHeaderButton
|
||||
{
|
||||
Alpha = 0,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -734,13 +739,16 @@ namespace osu.Game.Overlays.Profile
|
||||
|
||||
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 = () =>
|
||||
{
|
||||
channelManager?.OpenPrivateChannel(user);
|
||||
userOverlay?.Hide();
|
||||
chatOverlay?.Show();
|
||||
};
|
||||
}
|
||||
|
||||
expandButton.Action = DetailsVisible.Toggle;
|
||||
|
||||
|
Reference in New Issue
Block a user