mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Make CreateIcon a property
This commit is contained in:
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
|
|
||||||
public override string TooltipText => "followers";
|
public override string TooltipText => "followers";
|
||||||
|
|
||||||
protected override IconUsage CreateIcon() => FontAwesome.Solid.User;
|
protected override IconUsage CreateIcon => FontAwesome.Solid.User;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
|
|
||||||
public override string TooltipText => "mapping subscribers";
|
public override string TooltipText => "mapping subscribers";
|
||||||
|
|
||||||
protected override IconUsage CreateIcon() => FontAwesome.Solid.Bell;
|
protected override IconUsage CreateIcon => FontAwesome.Solid.Bell;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Icon = CreateIcon(),
|
Icon = CreateIcon,
|
||||||
FillMode = FillMode.Fit,
|
FillMode = FillMode.Fit,
|
||||||
Size = new Vector2(50, 14)
|
Size = new Vector2(50, 14)
|
||||||
},
|
},
|
||||||
@ -45,7 +45,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract IconUsage CreateIcon();
|
protected abstract IconUsage CreateIcon { get; }
|
||||||
|
|
||||||
protected void SetValue(int value) => drawableText.Text = value.ToString("#,##0");
|
protected void SetValue(int value) => drawableText.Text = value.ToString("#,##0");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user