mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 05:22:54 +08:00
Add drawings screen
This commit is contained in:
parent
b610095ff5
commit
a918e83b1e
@ -8,6 +8,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Video;
|
using osu.Framework.Graphics.Video;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Tournament.Screens.Drawings;
|
||||||
using osu.Game.Tournament.Screens.Ladder;
|
using osu.Game.Tournament.Screens.Ladder;
|
||||||
using osu.Game.Tournament.Screens.TeamIntro;
|
using osu.Game.Tournament.Screens.TeamIntro;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
@ -20,6 +21,7 @@ namespace osu.Game.Tournament.Tests
|
|||||||
private LadderManager bracket;
|
private LadderManager bracket;
|
||||||
private MapPoolScreen mapPool;
|
private MapPoolScreen mapPool;
|
||||||
private TeamIntroScreen teamIntro;
|
private TeamIntroScreen teamIntro;
|
||||||
|
private DrawingsScreen drawings;
|
||||||
private Container screens;
|
private Container screens;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -44,6 +46,7 @@ namespace osu.Game.Tournament.Tests
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
new OsuButton { RelativeSizeAxes = Axes.X, Text = "Drawings", Action = () => setScreen(drawings) },
|
||||||
new OsuButton { RelativeSizeAxes = Axes.X, Text = "TeamIntro", Action = () => setScreen(teamIntro) },
|
new OsuButton { RelativeSizeAxes = Axes.X, Text = "TeamIntro", Action = () => setScreen(teamIntro) },
|
||||||
new OsuButton { RelativeSizeAxes = Axes.X, Text = "MapPool", Action = () => setScreen(mapPool) },
|
new OsuButton { RelativeSizeAxes = Axes.X, Text = "MapPool", Action = () => setScreen(mapPool) },
|
||||||
new OsuButton { RelativeSizeAxes = Axes.X, Text = "Bracket", Action = () => setScreen(bracket) },
|
new OsuButton { RelativeSizeAxes = Axes.X, Text = "Bracket", Action = () => setScreen(bracket) },
|
||||||
@ -54,16 +57,19 @@ namespace osu.Game.Tournament.Tests
|
|||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
RelativePositionAxes = Axes.Both,
|
||||||
|
X = 0.2f,
|
||||||
FillMode = FillMode.Fit,
|
FillMode = FillMode.Fit,
|
||||||
FillAspectRatio = 16/9f,
|
FillAspectRatio = 16/9f,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopLeft,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopLeft,
|
||||||
Size = new Vector2(0.8f, 1),
|
Size = new Vector2(0.8f, 1),
|
||||||
Masking = true,
|
//Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new VideoSprite(@"C:\Users\Dean\BG Side Logo - OWC.m4v")
|
new VideoSprite(@"C:\Users\Dean\BG Side Logo - OWC.m4v")
|
||||||
{
|
{
|
||||||
|
Loop = true,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
FillMode = FillMode.Fit,
|
FillMode = FillMode.Fit,
|
||||||
},
|
},
|
||||||
@ -75,7 +81,8 @@ namespace osu.Game.Tournament.Tests
|
|||||||
bracket = new LadderManager(Ladder),
|
bracket = new LadderManager(Ladder),
|
||||||
mapPool = new MapPoolScreen(Ladder.Groupings.First(g => g.Name == "Finals")),
|
mapPool = new MapPoolScreen(Ladder.Groupings.First(g => g.Name == "Finals")),
|
||||||
teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"),
|
teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"),
|
||||||
Ladder.Groupings.First(g => g.Name == "Finals"))
|
Ladder.Groupings.First(g => g.Name == "Finals")),
|
||||||
|
drawings = new DrawingsScreen()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
var p3 = new Vector2(p2.X, c2.Y);
|
var p3 = new Vector2(p2.X, c2.Y);
|
||||||
var p4 = new Vector2(c2.X, p3.Y);
|
var p4 = new Vector2(c2.X, p3.Y);
|
||||||
|
|
||||||
Positions = new[] { p1, p2, p3, p4 }.Select(ToLocalSpace).ToList();
|
Vertices = new[] { p1, p2, p3, p4 }.Select(ToLocalSpace).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user