mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 13:22:55 +08:00
Tidy up ModIcon.
This commit is contained in:
parent
44f06e5423
commit
4b385ded26
@ -15,19 +15,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
private readonly TextAwesome modIcon;
|
private readonly TextAwesome modIcon;
|
||||||
private readonly TextAwesome background;
|
private readonly TextAwesome background;
|
||||||
|
|
||||||
private float iconSize = 80;
|
private const float icon_size = 80;
|
||||||
public float IconSize
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return iconSize;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
iconSize = value;
|
|
||||||
reapplySize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public new Color4 Colour
|
public new Color4 Colour
|
||||||
{
|
{
|
||||||
@ -71,8 +59,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
private void reapplySize()
|
private void reapplySize()
|
||||||
{
|
{
|
||||||
background.TextSize = iconSize;
|
background.TextSize = icon_size;
|
||||||
modIcon.TextSize = iconSize - 35;
|
modIcon.TextSize = icon_size - 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 getBackgroundColourFromMod(Mod mod)
|
private Color4 getBackgroundColourFromMod(Mod mod)
|
||||||
|
Loading…
Reference in New Issue
Block a user