mirror of https://github.com/ppy/osu
Merge pull request #1345 from EVAST9919/user_overlay_tooltip
Add tooltip to username in the profile overlay
This commit is contained in:
commit
bf9c71a6a3
|
@ -1 +1 @@
|
||||||
Subproject commit 255b94f5dde0188db1a5b37daf9649659e2b8366
|
Subproject commit 3760443ea9bf682a1bbf6cfa6aa00ea9541c12aa
|
|
@ -19,6 +19,7 @@
|
||||||
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 @@ public ProfileHeader(User user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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 @@ private void load(OsuColour colours)
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue