Add ability to load Drawings flags from osu/Drawings/Flags.

This commit is contained in:
smoogipooo
2017-05-02 13:23:09 +09:00
parent e856abe59a
commit f17046abaf
5 changed files with 38 additions and 15 deletions

View File

@ -73,9 +73,9 @@ namespace osu.Game.Screens.Tournament
};
}
public void AddTeam(Team team)
public void AddTeam(Team team, TextureStore flagStore)
{
GroupTeam gt = new GroupTeam(team);
GroupTeam gt = new GroupTeam(team, flagStore);
if (TeamsCount < 8)
{
@ -127,8 +127,12 @@ namespace osu.Game.Screens.Tournament
private readonly FillFlowContainer innerContainer;
private readonly Sprite flagSprite;
public GroupTeam(Team team)
private readonly TextureStore flagStore;
public GroupTeam(Team team, TextureStore flagStore)
{
this.flagStore = flagStore;
Team = team;
Width = 36;
@ -178,9 +182,9 @@ namespace osu.Game.Screens.Tournament
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load()
{
flagSprite.Texture = textures.Get($@"Flags/{Team.FlagName}");
flagSprite.Texture = flagStore.Get($@"Flags/{Team.FlagName}");
}
}
}