mirror of
https://github.com/osukey/osukey.git
synced 2025-06-20 18:58:05 +09: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.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -191,8 +190,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
|
|
||||||
public RoundDisplay()
|
public RoundDisplay()
|
||||||
{
|
{
|
||||||
CornerRadius = 10;
|
|
||||||
Masking = true;
|
|
||||||
Width = 200;
|
Width = 200;
|
||||||
Height = 20;
|
Height = 20;
|
||||||
}
|
}
|
||||||
@ -208,11 +205,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
|
||||||
{
|
|
||||||
Colour = new Color4(47, 71, 67, 255),
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
@ -6,17 +6,25 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Screens.Showcase
|
namespace osu.Game.Tournament.Screens.Showcase
|
||||||
{
|
{
|
||||||
public class TournamentLogo : CompositeDrawable
|
public class TournamentLogo : CompositeDrawable
|
||||||
{
|
{
|
||||||
public TournamentLogo()
|
public TournamentLogo(bool includeRoundBackground = true)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 95;
|
|
||||||
Margin = new MarginPadding { Vertical = 5 };
|
Margin = new MarginPadding { Vertical = 5 };
|
||||||
|
|
||||||
|
if (includeRoundBackground)
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Masking = true;
|
||||||
|
Height = 100;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -27,9 +35,6 @@ namespace osu.Game.Tournament.Screens.Showcase
|
|||||||
Texture = textures.Get("game-screen-logo"),
|
Texture = textures.Get("game-screen-logo"),
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = 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,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
},
|
},
|
||||||
new TournamentLogo(),
|
new TournamentLogo(false),
|
||||||
mainContainer = new Container
|
mainContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user