diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 6bfe70d873..0ead4ea019 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -207,14 +207,12 @@ namespace osu.Game.Overlays.Mods { Origin = Anchor.BottomRight, Anchor = Anchor.BottomRight, - AutoSizeAxes = Axes.Both, Position = new Vector2(1.5f), }, foregroundIcon = new ModIcon(Mods[0]) { Origin = Anchor.BottomRight, Anchor = Anchor.BottomRight, - AutoSizeAxes = Axes.Both, Position = new Vector2(-1.5f), }, }); @@ -225,7 +223,6 @@ namespace osu.Game.Overlays.Mods { Origin = Anchor.Centre, Anchor = Anchor.Centre, - AutoSizeAxes = Axes.Both, }); } } diff --git a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs index 5088fe5f67..35f4778047 100644 --- a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs +++ b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs @@ -163,11 +163,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks }); foreach (Mod mod in Score.Mods) - modsContainer.Add(new ModIcon(mod) - { - AutoSizeAxes = Axes.Both, - Scale = new Vector2(0.5f), - }); + modsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.5f) }); } protected override bool OnClick(InputState state) => true; diff --git a/osu.Game/Rulesets/UI/ModIcon.cs b/osu.Game/Rulesets/UI/ModIcon.cs index 7f7068d341..5ca3d9521b 100644 --- a/osu.Game/Rulesets/UI/ModIcon.cs +++ b/osu.Game/Rulesets/UI/ModIcon.cs @@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.UI private readonly SpriteIcon modIcon; private readonly SpriteIcon background; - private const float background_size = 80; + private const float size = 80; public FontAwesome Icon { @@ -38,23 +38,25 @@ namespace osu.Game.Rulesets.UI TooltipText = mod.Name; + Size = new Vector2(size); + Children = new Drawable[] { background = new SpriteIcon { Origin = Anchor.Centre, Anchor = Anchor.Centre, - Size = new Vector2(background_size), + Size = new Vector2(size), Icon = FontAwesome.fa_osu_mod_bg, + Y = -6.5f, Shadow = true, }, modIcon = new SpriteIcon { - Origin = Anchor.TopCentre, - Anchor = Anchor.TopCentre, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, Colour = OsuColour.Gray(84), - Size = new Vector2(background_size - 35), - Y = 25, + Size = new Vector2(size - 35), Icon = mod.Icon }, }; diff --git a/osu.Game/Screens/Play/HUD/ModDisplay.cs b/osu.Game/Screens/Play/HUD/ModDisplay.cs index 18a3096d7c..fd0e71ece8 100644 --- a/osu.Game/Screens/Play/HUD/ModDisplay.cs +++ b/osu.Game/Screens/Play/HUD/ModDisplay.cs @@ -55,11 +55,7 @@ namespace osu.Game.Screens.Play.HUD iconsContainer.Clear(); foreach (Mod mod in mods) { - iconsContainer.Add(new ModIcon(mod) - { - AutoSizeAxes = Axes.Both, - Scale = new Vector2(0.6f), - }); + iconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) }); } if (IsLoaded) diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index de381cd2dc..9044938a75 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -264,11 +264,7 @@ namespace osu.Game.Screens.Select.Leaderboards foreach (Mod mod in Score.Mods) { - modsContainer.Add(new ModIcon(mod) - { - AutoSizeAxes = Axes.Both, - Scale = new Vector2(0.375f) - }); + modsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.375f) }); } }