mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
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:
commit
85fdf7d97f
@ -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,
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user