mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 23:32:59 +08:00
Fix alignment on schedule screen
This commit is contained in:
parent
059aea8ead
commit
434feb5ac6
@ -2,6 +2,8 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Screens.Schedule;
|
using osu.Game.Tournament.Screens.Schedule;
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Tests.Screens
|
namespace osu.Game.Tournament.Tests.Screens
|
||||||
@ -11,6 +13,7 @@ namespace osu.Game.Tournament.Tests.Screens
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
Add(new TourneyVideo("main") { RelativeSizeAxes = Axes.Both });
|
||||||
Add(new ScheduleScreen());
|
Add(new ScheduleScreen());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
private readonly bool editor;
|
private readonly bool editor;
|
||||||
protected readonly FillFlowContainer<DrawableMatchTeam> Flow;
|
protected readonly FillFlowContainer<DrawableMatchTeam> Flow;
|
||||||
private readonly Drawable selectionBox;
|
private readonly Drawable selectionBox;
|
||||||
private readonly Drawable currentMatchSelectionBox;
|
protected readonly Drawable CurrentMatchSelectionBox;
|
||||||
private Bindable<TournamentMatch> globalSelection;
|
private Bindable<TournamentMatch> globalSelection;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
@ -55,11 +55,9 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
Colour = Color4.YellowGreen,
|
Colour = Color4.YellowGreen,
|
||||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
},
|
},
|
||||||
currentMatchSelectionBox = new Container
|
CurrentMatchSelectionBox = new Container
|
||||||
{
|
{
|
||||||
CornerRadius = 5,
|
Scale = new Vector2(1.05f, 1.1f),
|
||||||
Masking = true,
|
|
||||||
Scale = new Vector2(1.05f),
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -128,9 +126,9 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
private void updateCurrentMatch()
|
private void updateCurrentMatch()
|
||||||
{
|
{
|
||||||
if (Match.Current.Value)
|
if (Match.Current.Value)
|
||||||
currentMatchSelectionBox.Show();
|
CurrentMatchSelectionBox.Show();
|
||||||
else
|
else
|
||||||
currentMatchSelectionBox.Hide();
|
CurrentMatchSelectionBox.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool selected;
|
private bool selected;
|
||||||
|
@ -127,7 +127,7 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.65f,
|
Height = 0.74f,
|
||||||
Child = new FillFlowContainer
|
Child = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -162,7 +162,7 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
{
|
{
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(30),
|
Spacing = new Vector2(30),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -207,6 +207,8 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
{
|
{
|
||||||
Flow.Direction = FillDirection.Horizontal;
|
Flow.Direction = FillDirection.Horizontal;
|
||||||
|
|
||||||
|
Scale = new Vector2(0.8f);
|
||||||
|
|
||||||
bool conditional = match is ConditionalTournamentMatch;
|
bool conditional = match is ConditionalTournamentMatch;
|
||||||
|
|
||||||
if (conditional)
|
if (conditional)
|
||||||
@ -218,15 +220,16 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Colour = Color4.Black,
|
Colour = OsuColour.Gray(0.7f),
|
||||||
Alpha = conditional ? 0.6f : 1,
|
Alpha = conditional ? 0.6f : 1,
|
||||||
|
Font = OsuFont.Torus,
|
||||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||||
});
|
});
|
||||||
AddInternal(new TournamentSpriteText
|
AddInternal(new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Colour = Color4.Black,
|
Colour = OsuColour.Gray(0.7f),
|
||||||
Alpha = conditional ? 0.6f : 1,
|
Alpha = conditional ? 0.6f : 1,
|
||||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||||
Text = match.Date.Value.ToUniversalTime().ToString("HH:mm UTC") + (conditional ? " (conditional)" : "")
|
Text = match.Date.Value.ToUniversalTime().ToString("HH:mm UTC") + (conditional ? " (conditional)" : "")
|
||||||
@ -243,19 +246,26 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
|
|
||||||
public ScheduleContainer(string title)
|
public ScheduleContainer(string title)
|
||||||
{
|
{
|
||||||
Padding = new MarginPadding { Left = 30, Top = 10 };
|
Padding = new MarginPadding { Left = 60, Top = 10 };
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new TournamentSpriteTextWithBackground(title.ToUpperInvariant())
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
X = 30,
|
|
||||||
Scale = new Vector2(0.5f)
|
|
||||||
},
|
|
||||||
content = new FillFlowContainer
|
|
||||||
{
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Margin = new MarginPadding(10)
|
Direction = FillDirection.Vertical,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new TournamentSpriteTextWithBackground(title.ToUpperInvariant())
|
||||||
|
{
|
||||||
|
Scale = new Vector2(0.5f)
|
||||||
|
},
|
||||||
|
content = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Margin = new MarginPadding(10)
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user