mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Made requested changes
This commit is contained in:
@ -24,7 +24,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
private const float corner_radius = 5;
|
||||
private const float edge_margin = 10;
|
||||
private const float background_alpha = 0.25f;
|
||||
private const float score_rank_size = 40f;
|
||||
private const float index_width = 40;
|
||||
|
||||
private readonly EdgeEffect imageShadow = new EdgeEffect
|
||||
{
|
||||
@ -129,7 +129,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = 40,
|
||||
Width = index_width,
|
||||
Children = new[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
@ -145,7 +145,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = 40, },
|
||||
Padding = new MarginPadding { Left = index_width, },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -213,7 +213,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(10f, 0f),
|
||||
Margin = new MarginPadding { Left = 10, },
|
||||
Margin = new MarginPadding { Left = edge_margin, },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
maxCombo = new ScoreComponentLabel(FontAwesome.fa_link, Score.MaxCombo.ToString()),
|
||||
@ -224,26 +224,39 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
},
|
||||
},
|
||||
},
|
||||
scoreRank = new DrawableRank(Score.Rank)
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Size = new Vector2(score_rank_size),
|
||||
Position = new Vector2(0f, -10f),
|
||||
},
|
||||
scoreLabel = new GlowingSpriteText(Score.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa"))
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Position = new Vector2(-score_rank_size - 5f, 0f),
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(5f, 0f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
scoreLabel = new GlowingSpriteText(Score.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa"))
|
||||
{
|
||||
|
||||
},
|
||||
new Container
|
||||
{
|
||||
Size = new Vector2(40f, 20f),
|
||||
Children = new[]
|
||||
{
|
||||
scoreRank = new DrawableRank(Score.Rank)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(40f),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
modsContainer = new FillFlowContainer<ScoreModIcon>
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
// TODO: Probably remove? Seems like others don't like this kind of thing
|
||||
Position = new Vector2(0f, 4f), //properly align the mod icons
|
||||
Direction = FillDirection.Horizontal,
|
||||
},
|
||||
},
|
||||
@ -325,6 +338,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
Colour = colour,
|
||||
Shadow = true,
|
||||
TextSize = 30,
|
||||
UseFullGlyphHeight = false,
|
||||
},
|
||||
new TextAwesome
|
||||
{
|
||||
@ -333,6 +347,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
Icon = icon,
|
||||
Colour = OsuColour.Gray(84),
|
||||
TextSize = 18,
|
||||
Position = new Vector2(0f, 2f),
|
||||
UseFullGlyphHeight = false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Screens.Tournament
|
||||
private GroupContainer groupsContainer;
|
||||
private OsuSpriteText fullTeamNameText;
|
||||
|
||||
private List<Region> allTeams = new List<Region>();
|
||||
private List<Country> allTeams = new List<Country>();
|
||||
|
||||
private DrawingsConfigManager drawingsConfig;
|
||||
|
||||
@ -239,7 +239,7 @@ namespace osu.Game.Screens.Tournament
|
||||
reset(true);
|
||||
}
|
||||
|
||||
private void onTeamSelected(Region team)
|
||||
private void onTeamSelected(Country team)
|
||||
{
|
||||
groupsContainer.AddTeam(team);
|
||||
|
||||
@ -276,13 +276,13 @@ namespace osu.Game.Screens.Tournament
|
||||
teamsContainer.ClearTeams();
|
||||
allTeams.Clear();
|
||||
|
||||
foreach (Region r in TeamList.Teams)
|
||||
foreach (Country t in TeamList.Teams)
|
||||
{
|
||||
if (groupsContainer.ContainsTeam(r.FullName))
|
||||
if (groupsContainer.ContainsTeam(t.FullName))
|
||||
continue;
|
||||
|
||||
allTeams.Add(r);
|
||||
teamsContainer.AddTeam(r);
|
||||
allTeams.Add(t);
|
||||
teamsContainer.AddTeam(t);
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ namespace osu.Game.Screens.Tournament
|
||||
if (line.ToUpper().StartsWith("GROUP"))
|
||||
continue;
|
||||
|
||||
Region teamToAdd = allTeams.FirstOrDefault(r => r.FullName == line);
|
||||
Country teamToAdd = allTeams.FirstOrDefault(t => t.FullName == line);
|
||||
|
||||
if (teamToAdd == null)
|
||||
continue;
|
||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Screens.Tournament
|
||||
};
|
||||
}
|
||||
|
||||
public void AddTeam(Region team)
|
||||
public void AddTeam(Country team)
|
||||
{
|
||||
GroupTeam gt = new GroupTeam(team);
|
||||
|
||||
@ -91,7 +91,7 @@ namespace osu.Game.Screens.Tournament
|
||||
return allTeams.Any(t => t.Team.FullName == fullName);
|
||||
}
|
||||
|
||||
public bool RemoveTeam(Region team)
|
||||
public bool RemoveTeam(Country team)
|
||||
{
|
||||
allTeams.RemoveAll(gt => gt.Team == team);
|
||||
|
||||
@ -122,12 +122,12 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
private class GroupTeam : Container
|
||||
{
|
||||
public Region Team;
|
||||
public Country Team;
|
||||
|
||||
private FillFlowContainer innerContainer;
|
||||
private Sprite flagSprite;
|
||||
|
||||
public GroupTeam(Region team)
|
||||
public GroupTeam(Country team)
|
||||
{
|
||||
Team = team;
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Screens.Tournament
|
||||
}
|
||||
}
|
||||
|
||||
public void AddTeam(Region team)
|
||||
public void AddTeam(Country team)
|
||||
{
|
||||
if (groups[currentGroup].TeamsCount == maxTeams)
|
||||
return;
|
||||
|
@ -22,9 +22,9 @@ namespace osu.Game.Screens.Tournament
|
||||
public class ScrollingTeamContainer : Container
|
||||
{
|
||||
public event Action OnScrollStarted;
|
||||
public event Action<Region> OnSelected;
|
||||
public event Action<Country> OnSelected;
|
||||
|
||||
private readonly List<Region> availableTeams = new List<Region>();
|
||||
private readonly List<Country> availableTeams = new List<Country>();
|
||||
|
||||
private Container tracker;
|
||||
|
||||
@ -158,7 +158,7 @@ namespace osu.Game.Screens.Tournament
|
||||
}
|
||||
}
|
||||
|
||||
public void AddTeam(Region team)
|
||||
public void AddTeam(Country team)
|
||||
{
|
||||
if (availableTeams.Contains(team))
|
||||
return;
|
||||
@ -169,12 +169,12 @@ namespace osu.Game.Screens.Tournament
|
||||
scrollState = ScrollState.Idle;
|
||||
}
|
||||
|
||||
public void AddTeams(IEnumerable<Region> teams)
|
||||
public void AddTeams(IEnumerable<Country> teams)
|
||||
{
|
||||
if (teams == null)
|
||||
return;
|
||||
|
||||
foreach (Region t in teams)
|
||||
foreach (Country t in teams)
|
||||
AddTeam(t);
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ namespace osu.Game.Screens.Tournament
|
||||
scrollState = ScrollState.Idle;
|
||||
}
|
||||
|
||||
public void RemoveTeam(Region team)
|
||||
public void RemoveTeam(Country team)
|
||||
{
|
||||
availableTeams.Remove(team);
|
||||
|
||||
@ -270,9 +270,9 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
private void addFlags()
|
||||
{
|
||||
foreach (Region r in availableTeams)
|
||||
foreach (Country t in availableTeams)
|
||||
{
|
||||
Add(new ScrollingTeam(r)
|
||||
Add(new ScrollingTeam(t)
|
||||
{
|
||||
X = leftPos + DrawWidth
|
||||
});
|
||||
@ -326,7 +326,7 @@ namespace osu.Game.Screens.Tournament
|
||||
public const float WIDTH = 58;
|
||||
public const float HEIGHT = 41;
|
||||
|
||||
public Region Team;
|
||||
public Country Team;
|
||||
|
||||
private Sprite flagSprite;
|
||||
private Box outline;
|
||||
@ -346,7 +346,7 @@ namespace osu.Game.Screens.Tournament
|
||||
}
|
||||
}
|
||||
|
||||
public ScrollingTeam(Region team)
|
||||
public ScrollingTeam(Country team)
|
||||
{
|
||||
Team = team;
|
||||
|
||||
|
@ -8,6 +8,6 @@ namespace osu.Game.Screens.Tournament.Teams
|
||||
{
|
||||
public interface ITeamList
|
||||
{
|
||||
IEnumerable<Region> Teams { get; }
|
||||
IEnumerable<Country> Teams { get; }
|
||||
}
|
||||
}
|
||||
|
@ -21,11 +21,11 @@ namespace osu.Game.Screens.Tournament.Teams
|
||||
this.storage = storage;
|
||||
}
|
||||
|
||||
public IEnumerable<Region> Teams
|
||||
public IEnumerable<Country> Teams
|
||||
{
|
||||
get
|
||||
{
|
||||
var teams = new List<Region>();
|
||||
var teams = new List<Country>();
|
||||
|
||||
try
|
||||
{
|
||||
@ -53,7 +53,7 @@ namespace osu.Game.Screens.Tournament.Teams
|
||||
string acronym = split.Length >= 3 ? split[2].Trim() : teamName;
|
||||
acronym = acronym.Substring(0, Math.Min(3, acronym.Length));
|
||||
|
||||
teams.Add(new Region
|
||||
teams.Add(new Country
|
||||
{
|
||||
FlagName = flagName,
|
||||
FullName = teamName,
|
||||
|
Reference in New Issue
Block a user