Add ShowPlaceholderOnNull in updateable flag + do not show placeholders in some overlays

This commit is contained in:
KingLuigi4932
2019-06-19 20:17:02 +03:00
parent 97dd34e26c
commit 5f5441c692
4 changed files with 24 additions and 5 deletions

View File

@ -14,14 +14,25 @@ namespace osu.Game.Users.Drawables
set => Model = value;
}
/// <summary>
/// Whether to show a place holder on null country.
/// </summary>
public bool ShowPlaceholderOnNull = true;
public UpdateableFlag(Country country = null)
{
Country = country;
}
protected override Drawable CreateDrawable(Country country) => new DrawableFlag(country)
protected override Drawable CreateDrawable(Country country)
{
RelativeSizeAxes = Axes.Both,
};
if (country == null && !ShowPlaceholderOnNull)
return null;
return new DrawableFlag(country)
{
RelativeSizeAxes = Axes.Both,
};
}
}
}