mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 12:23:13 +08:00
Make probationary groups a bit transparent
This commit is contained in:
parent
f87bb589a2
commit
64c9654910
@ -90,7 +90,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
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[] { "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" } },
|
||||||
|
new APIUserGroup { Colour = "#A347EB", ShortName = "BN", Name = "Beatmap Nominators", Playmodes = new[] { "osu", "taiko", "fruits", "mania" } },
|
||||||
|
new APIUserGroup { Colour = "#A347EB", ShortName = "BN", Name = "Beatmap Nominators (Probationary)", Playmodes = new[] { "osu", "taiko", "fruits", "mania" }, IsProbationary = true }
|
||||||
},
|
},
|
||||||
ProfileOrder = new[]
|
ProfileOrder = new[]
|
||||||
{
|
{
|
||||||
|
@ -42,12 +42,15 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
{
|
{
|
||||||
FillFlowContainer innerContainer;
|
FillFlowContainer innerContainer;
|
||||||
|
|
||||||
AddRangeInternal(new Drawable[]
|
// Normal background color is 0.75 opacity, probationary doesn't have this cause it will make them a bit transparent
|
||||||
|
var bgColor = group.IsProbationary ? colourProvider?.Background6 ?? Colour4.Black : (colourProvider?.Background6 ?? Colour4.Black).Opacity(0.75f);
|
||||||
|
|
||||||
|
var groupDrawables = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider?.Background6 ?? Colour4.Black
|
Colour = bgColor
|
||||||
},
|
},
|
||||||
innerContainer = new FillFlowContainer
|
innerContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -68,7 +71,19 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
AddRangeInternal(groupDrawables);
|
||||||
|
|
||||||
|
// Probationary groups have an opacity of 60%
|
||||||
|
if (group.IsProbationary)
|
||||||
|
{
|
||||||
|
foreach (var drawable in groupDrawables)
|
||||||
|
{
|
||||||
|
drawable.Alpha = 0.6f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (group.Playmodes?.Length > 0)
|
if (group.Playmodes?.Length > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user