mirror of
https://github.com/osukey/osukey.git
synced 2025-07-23 03:10:05 +09:00
Add modes text to groups tooltip
This commit is contained in:
@ -89,6 +89,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Groups = new[]
|
Groups = new[]
|
||||||
{
|
{
|
||||||
new APIUserGroup { Colour = "#EB47D0", ShortName = "DEV", Name = "Developers" },
|
new APIUserGroup { Colour = "#EB47D0", ShortName = "DEV", Name = "Developers" },
|
||||||
|
new APIUserGroup { Colour = "#A347EB", ShortName = "BN", Name = "Beatmap Nominators", Playmodes = new[] { "mania" } },
|
||||||
new APIUserGroup { Colour = "#A347EB", ShortName = "BN", Name = "Beatmap Nominators", Playmodes = new[] { "osu", "taiko" } }
|
new APIUserGroup { Colour = "#A347EB", ShortName = "BN", Name = "Beatmap Nominators", Playmodes = new[] { "osu", "taiko" } }
|
||||||
},
|
},
|
||||||
ProfileOrder = new[]
|
ProfileOrder = new[]
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
{
|
{
|
||||||
public partial class GroupBadge : Container, IHasTooltip
|
public partial class GroupBadge : Container, IHasTooltip
|
||||||
{
|
{
|
||||||
public LocalisableString TooltipText { get; }
|
public LocalisableString TooltipText { get; set; }
|
||||||
|
|
||||||
public int TextSize { get; set; } = 12;
|
public int TextSize { get; set; } = 12;
|
||||||
|
|
||||||
@ -34,7 +34,9 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
Masking = true;
|
Masking = true;
|
||||||
CornerRadius = 8;
|
CornerRadius = 8;
|
||||||
|
|
||||||
|
|
||||||
TooltipText = group.Name;
|
TooltipText = group.Name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -79,6 +81,14 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
})).ToList()
|
})).ToList()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (group.Playmodes?.Length > 0)
|
||||||
|
{
|
||||||
|
var badgeModesList = group.Playmodes.Select(p => rulesets.GetRuleset(p)?.Name).ToList();
|
||||||
|
|
||||||
|
string modesDisplay = string.Join(", ", badgeModesList);
|
||||||
|
this.TooltipText += $" ({modesDisplay})";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user