mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Merge pull request #22340 from EXtremeExploit/groups-modes
Add modes text to groups tooltip
This commit is contained in:
commit
f87bb589a2
@ -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; private set; }
|
||||||
|
|
||||||
public int TextSize { get; set; } = 12;
|
public int TextSize { get; set; } = 12;
|
||||||
|
|
||||||
@ -78,6 +78,11 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
icon.Size = new Vector2(TextSize - 1);
|
icon.Size = new Vector2(TextSize - 1);
|
||||||
})).ToList()
|
})).ToList()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var badgeModesList = group.Playmodes.Select(p => rulesets.GetRuleset(p)?.Name).ToList();
|
||||||
|
|
||||||
|
string modesDisplay = string.Join(", ", badgeModesList);
|
||||||
|
TooltipText += $" ({modesDisplay})";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user