mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add ShowPlaceholderOnNull in updateable flag + do not show placeholders in some overlays
This commit is contained in:
@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user