mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 14:02:53 +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.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Tournament.Components;
|
||||
using osu.Game.Tournament.Screens.Schedule;
|
||||
|
||||
namespace osu.Game.Tournament.Tests.Screens
|
||||
@ -11,6 +13,7 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Add(new TourneyVideo("main") { RelativeSizeAxes = Axes.Both });
|
||||
Add(new ScheduleScreen());
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
private readonly bool editor;
|
||||
protected readonly FillFlowContainer<DrawableMatchTeam> Flow;
|
||||
private readonly Drawable selectionBox;
|
||||
private readonly Drawable currentMatchSelectionBox;
|
||||
protected readonly Drawable CurrentMatchSelectionBox;
|
||||
private Bindable<TournamentMatch> globalSelection;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
@ -55,11 +55,9 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
Colour = Color4.YellowGreen,
|
||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
currentMatchSelectionBox = new Container
|
||||
CurrentMatchSelectionBox = new Container
|
||||
{
|
||||
CornerRadius = 5,
|
||||
Masking = true,
|
||||
Scale = new Vector2(1.05f),
|
||||
Scale = new Vector2(1.05f, 1.1f),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
@ -128,9 +126,9 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
private void updateCurrentMatch()
|
||||
{
|
||||
if (Match.Current.Value)
|
||||
currentMatchSelectionBox.Show();
|
||||
CurrentMatchSelectionBox.Show();
|
||||
else
|
||||
currentMatchSelectionBox.Hide();
|
||||
CurrentMatchSelectionBox.Hide();
|
||||
}
|
||||
|
||||
private bool selected;
|
||||
|
@ -127,7 +127,7 @@ namespace osu.Game.Tournament.Screens.Schedule
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Height = 0.65f,
|
||||
Height = 0.74f,
|
||||
Child = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -162,7 +162,7 @@ namespace osu.Game.Tournament.Screens.Schedule
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(30),
|
||||
Children = new Drawable[]
|
||||
@ -207,6 +207,8 @@ namespace osu.Game.Tournament.Screens.Schedule
|
||||
{
|
||||
Flow.Direction = FillDirection.Horizontal;
|
||||
|
||||
Scale = new Vector2(0.8f);
|
||||
|
||||
bool conditional = match is ConditionalTournamentMatch;
|
||||
|
||||
if (conditional)
|
||||
@ -218,15 +220,16 @@ namespace osu.Game.Tournament.Screens.Schedule
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopLeft,
|
||||
Colour = Color4.Black,
|
||||
Colour = OsuColour.Gray(0.7f),
|
||||
Alpha = conditional ? 0.6f : 1,
|
||||
Font = OsuFont.Torus,
|
||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||
});
|
||||
AddInternal(new TournamentSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Colour = Color4.Black,
|
||||
Colour = OsuColour.Gray(0.7f),
|
||||
Alpha = conditional ? 0.6f : 1,
|
||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||
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)
|
||||
{
|
||||
Padding = new MarginPadding { Left = 30, Top = 10 };
|
||||
Padding = new MarginPadding { Left = 60, Top = 10 };
|
||||
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,
|
||||
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