mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +08:00
Fix sizing of ModIcon
This commit is contained in:
parent
eaf1a60fe1
commit
f912744acc
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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)
|
||||
|
@ -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) });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user