mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Merge pull request #1345 from EVAST9919/user_overlay_tooltip
Add tooltip to username in the profile overlay
This commit is contained in:
Submodule osu-framework updated: 255b94f5dd...3760443ea9
@ -19,6 +19,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile
|
namespace osu.Game.Overlays.Profile
|
||||||
{
|
{
|
||||||
@ -119,15 +120,11 @@ namespace osu.Game.Overlays.Profile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new LinkFlowContainer.LinkText
|
new LinkFlowContainer.ProfileLink(user)
|
||||||
{
|
{
|
||||||
Text = user.Username,
|
|
||||||
Url = $@"https://osu.ppy.sh/users/{user.Id}",
|
|
||||||
TextSize = 30,
|
|
||||||
Font = @"Exo2.0-RegularItalic",
|
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Y = -48
|
Y = -48,
|
||||||
},
|
},
|
||||||
countryFlag = new DrawableFlag(user.Country?.FlagName)
|
countryFlag = new DrawableFlag(user.Country?.FlagName)
|
||||||
{
|
{
|
||||||
@ -539,6 +536,19 @@ namespace osu.Game.Overlays.Profile
|
|||||||
hoverColour = colours.Yellow;
|
hoverColour = colours.Yellow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ProfileLink : LinkText, IHasTooltip
|
||||||
|
{
|
||||||
|
public string TooltipText => "View Profile in Browser";
|
||||||
|
|
||||||
|
public ProfileLink(User user)
|
||||||
|
{
|
||||||
|
Text = user.Username;
|
||||||
|
Url = $@"https://osu.ppy.sh/users/{user.Id}";
|
||||||
|
Font = @"Exo2.0-RegularItalic";
|
||||||
|
TextSize = 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user