mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:22:54 +08:00
Less verbose DrawableFlag constructor.
This commit is contained in:
parent
65c26f9b24
commit
c80f5c708a
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.Profile
|
|||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Y = -48
|
Y = -48
|
||||||
},
|
},
|
||||||
countryFlag = new DrawableFlag(user.Country?.FlagName ?? "__")
|
countryFlag = new DrawableFlag(user.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Multiplayer
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
host.Text = value.Username;
|
host.Text = value.Username;
|
||||||
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName ?? @"__") { RelativeSizeAxes = Axes.Both } };
|
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName) { RelativeSizeAxes = Axes.Both } };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
Masking = true,
|
Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DrawableFlag(Score.User?.Country?.FlagName ?? "__")
|
new DrawableFlag(Score.User?.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Width = 30,
|
Width = 30,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
@ -49,9 +49,9 @@ namespace osu.Game.Users
|
|||||||
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawableFlag(string name = @"__")
|
public DrawableFlag(string name = null)
|
||||||
{
|
{
|
||||||
flagName = name;
|
flagName = name ?? @"__";
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ namespace osu.Game.Users
|
|||||||
Spacing = new Vector2(5f, 0f),
|
Spacing = new Vector2(5f, 0f),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DrawableFlag(user.Country?.FlagName ?? @"__")
|
new DrawableFlag(user.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Width = 30f,
|
Width = 30f,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Loading…
Reference in New Issue
Block a user