Merge pull request #5127 from peppy/custom-tournament-header

Allow customisation of the colour portion of the tournament logo header
This commit is contained in:
Dan Balasescu 2019-06-24 14:45:08 +09:00 committed by GitHub
commit 85fdf7d97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 15 deletions

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
@ -191,8 +190,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
public RoundDisplay()
{
CornerRadius = 10;
Masking = true;
Width = 200;
Height = 20;
}
@ -208,11 +205,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
{
InternalChildren = new Drawable[]
{
new Box
{
Colour = new Color4(47, 71, 67, 255),
RelativeSizeAxes = Axes.Both,
},
new OsuSpriteText
{
Anchor = Anchor.Centre,

View File

@ -6,17 +6,25 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osuTK;
namespace osu.Game.Tournament.Screens.Showcase
{
public class TournamentLogo : CompositeDrawable
{
public TournamentLogo()
public TournamentLogo(bool includeRoundBackground = true)
{
RelativeSizeAxes = Axes.X;
Height = 95;
Margin = new MarginPadding { Vertical = 5 };
if (includeRoundBackground)
{
AutoSizeAxes = Axes.Y;
}
else
{
Masking = true;
Height = 100;
}
}
[BackgroundDependencyLoader]
@ -27,9 +35,6 @@ namespace osu.Game.Tournament.Screens.Showcase
Texture = textures.Get("game-screen-logo"),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
FillMode = FillMode.Fit,
RelativeSizeAxes = Axes.Both,
Size = Vector2.One
};
}
}

View File

@ -34,7 +34,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
RelativeSizeAxes = Axes.Both,
Loop = true,
},
new TournamentLogo(),
new TournamentLogo(false),
mainContainer = new Container
{
RelativeSizeAxes = Axes.Both,