mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:43:22 +08:00
Remove unnecessary container
This commit is contained in:
parent
7818ecd71c
commit
78e7be919f
@ -22,7 +22,6 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
public readonly Bindable<Country> Country = new Bindable<Country>();
|
public readonly Bindable<Country> Country = new Bindable<Country>();
|
||||||
|
|
||||||
private readonly SpriteText scopeText;
|
private readonly SpriteText scopeText;
|
||||||
private readonly Container flagPlaceholder;
|
|
||||||
private readonly DismissableFlag flag;
|
private readonly DismissableFlag flag;
|
||||||
|
|
||||||
public HeaderTitle()
|
public HeaderTitle()
|
||||||
@ -35,16 +34,12 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
Spacing = new Vector2(spacing, 0),
|
Spacing = new Vector2(spacing, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
flagPlaceholder = new Container
|
flag = new DismissableFlag
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Margin = new MarginPadding { Bottom = flag_margin },
|
Margin = new MarginPadding { Bottom = flag_margin },
|
||||||
Child = flag = new DismissableFlag
|
Size = new Vector2(30, 20),
|
||||||
{
|
|
||||||
Size = new Vector2(30, 20),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
scopeText = new SpriteText
|
scopeText = new SpriteText
|
||||||
{
|
{
|
||||||
@ -90,15 +85,13 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
{
|
{
|
||||||
if (country.NewValue == null)
|
if (country.NewValue == null)
|
||||||
{
|
{
|
||||||
flagPlaceholder.Hide();
|
flag.Hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Scope.Value = RankingsScope.Performance;
|
Scope.Value = RankingsScope.Performance;
|
||||||
|
|
||||||
if (country.OldValue == null)
|
flag.Show();
|
||||||
flagPlaceholder.Show();
|
|
||||||
|
|
||||||
flag.Country = country.NewValue;
|
flag.Country = country.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user