Fix unnecessary texture atlas generation

This commit is contained in:
Dean Herbert 2019-02-17 19:48:54 +09:00
parent fcab21908b
commit 6ea1ed8d04
7 changed files with 17 additions and 13 deletions

View File

@ -140,7 +140,7 @@ private void load(LadderInfo ladder, Storage storage)
if (!string.IsNullOrEmpty(mods))
AddInternal(new Sprite
{
Texture = new TextureStore(new TextureLoaderStore(new StorageBackedResourceStore(storage))).Get($"mods/{mods}"),
Texture = new LargeTextureStore(new TextureLoaderStore(new StorageBackedResourceStore(storage))).Get($"mods/{mods}"),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Margin = new MarginPadding(20),

View File

@ -6,7 +6,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
@ -22,7 +21,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
public class MatchHeader : Container
{
[BackgroundDependencyLoader]
private void load(LadderInfo ladder, TextureStore textures)
private void load(LadderInfo ladder)
{
RelativeSizeAxes = Axes.X;
Height = 95;

View File

@ -6,7 +6,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Textures;
using osu.Framework.Threading;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components;
@ -37,7 +36,7 @@ public class GameplayScreen : BeatmapInfoScreen
private TournamentSceneManager sceneManager { get; set; }
[BackgroundDependencyLoader]
private void load(LadderInfo ladder, TextureStore textures, MatchIPCInfo ipc, MatchChatDisplay chat)
private void load(LadderInfo ladder, MatchIPCInfo ipc, MatchChatDisplay chat)
{
this.chat = chat;
this.ipc = ipc;

View File

@ -18,6 +18,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
public class DrawableMatchPairing : CompositeDrawable
{
public readonly MatchPairing Pairing;
private readonly bool editor;
protected readonly FillFlowContainer<DrawableMatchTeam> Flow;
private readonly Drawable selectionBox;
private readonly Drawable currentMatchSelectionBox;
@ -26,9 +27,14 @@ public class DrawableMatchPairing : CompositeDrawable
[Resolved(CanBeNull = true)]
private LadderEditorInfo editorInfo { get; set; }
public DrawableMatchPairing(MatchPairing pairing)
[Resolved(CanBeNull = true)]
private LadderInfo ladderInfo { get; set; }
public DrawableMatchPairing(MatchPairing pairing, bool editor = false)
{
Pairing = pairing;
this.editor = editor;
AutoSizeAxes = Axes.Both;
@ -109,7 +115,10 @@ public bool Selected
if (selected)
{
selectionBox.Show();
editorInfo.Selected.Value = Pairing;
if (editor)
editorInfo.Selected.Value = Pairing;
else
ladderInfo.CurrentMatch.Value = Pairing;
}
else
selectionBox.Hide();

View File

@ -2,14 +2,13 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Tournament.Screens.Showcase
{
public class ShowcaseScreen : BeatmapInfoScreen
{
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load()
{
AddInternal(new TournamentLogo());
}

View File

@ -5,7 +5,6 @@
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Video;
using osu.Framework.Platform;
using osu.Game.Graphics;
@ -25,7 +24,7 @@ public class TeamIntroScreen : TournamentScreen, IProvideVideo
private readonly Bindable<MatchPairing> currentMatch = new Bindable<MatchPairing>();
[BackgroundDependencyLoader]
private void load(TextureStore textures, LadderInfo ladder, Storage storage)
private void load(LadderInfo ladder, Storage storage)
{
RelativeSizeAxes = Axes.Both;

View File

@ -5,7 +5,6 @@
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Video;
using osu.Framework.Platform;
using osu.Game.Graphics;
@ -29,7 +28,7 @@ public class TeamWinScreen : TournamentScreen, IProvideVideo
private VideoSprite redWinVideo;
[BackgroundDependencyLoader]
private void load(TextureStore textures, LadderInfo ladder, Storage storage)
private void load(LadderInfo ladder, Storage storage)
{
RelativeSizeAxes = Axes.Both;