mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Formatting fixes
This commit is contained in:
@ -33,7 +33,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
if(HoverColour == default)
|
if (HoverColour == default)
|
||||||
HoverColour = colours.Yellow;
|
HoverColour = colours.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,13 +24,17 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private Color4 linkBlue, communityUserGrayGreenLighter;
|
private Color4 linkBlue, communityUserGrayGreenLighter;
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
public User User
|
public User User
|
||||||
{
|
{
|
||||||
get => user;
|
get => user;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (user == value) return;
|
if (user == value)
|
||||||
|
return;
|
||||||
|
|
||||||
user = value;
|
user = value;
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,9 +135,8 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
bottomLinkContainer.AddText(" " + content, bold);
|
bottomLinkContainer.AddText(" " + content, bold);
|
||||||
}
|
|
||||||
addSpacer(bottomLinkContainer);
|
addSpacer(bottomLinkContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,13 +48,17 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private APIAccess apiAccess { get; set; }
|
private APIAccess apiAccess { get; set; }
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
public User User
|
public User User
|
||||||
{
|
{
|
||||||
get => user;
|
get => user;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (user == value) return;
|
if (user == value)
|
||||||
|
return;
|
||||||
|
|
||||||
user = value;
|
user = value;
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,7 +187,7 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium)
|
Font = OsuFont.GetFont(size: 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -26,13 +26,17 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private RankGraph rankGraph;
|
private RankGraph rankGraph;
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
public User User
|
public User User
|
||||||
{
|
{
|
||||||
get => user;
|
get => user;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (user == value) return;
|
if (user == value)
|
||||||
|
return;
|
||||||
|
|
||||||
user = value;
|
user = value;
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,7 +185,7 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
totalPlayTimeTooltip.TooltipText = (user?.Statistics?.PlayTime ?? 0) / 3600 + " hours";
|
totalPlayTimeTooltip.TooltipText = (user?.Statistics?.PlayTime ?? 0) / 3600 + " hours";
|
||||||
|
|
||||||
foreach (var scoreRankInfo in scoreRankInfos)
|
foreach (var scoreRankInfo in scoreRankInfos)
|
||||||
scoreRankInfo.Value.RankCount = user?.Statistics?.GradesCount.GetForScoreRank(scoreRankInfo.Key) ?? 0;
|
scoreRankInfo.Value.RankCount = user?.Statistics?.GradesCount[scoreRankInfo.Key] ?? 0;
|
||||||
|
|
||||||
detailGlobalRank.Content = user?.Statistics?.Ranks.Global?.ToString("#,##0") ?? "-";
|
detailGlobalRank.Content = user?.Statistics?.Ranks.Global?.ToString("#,##0") ?? "-";
|
||||||
detailCountryRank.Content = user?.Statistics?.Ranks.Country?.ToString("#,##0") ?? "-";
|
detailCountryRank.Content = user?.Statistics?.Ranks.Country?.ToString("#,##0") ?? "-";
|
||||||
|
@ -22,13 +22,17 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private FillFlowContainer badgeFlowContainer;
|
private FillFlowContainer badgeFlowContainer;
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
public User User
|
public User User
|
||||||
{
|
{
|
||||||
get => user;
|
get => user;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (user == value) return;
|
if (user == value)
|
||||||
|
return;
|
||||||
|
|
||||||
user = value;
|
user = value;
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,13 +28,17 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private const float avatar_size = 110;
|
private const float avatar_size = 110;
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
public User User
|
public User User
|
||||||
{
|
{
|
||||||
get => user;
|
get => user;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (user == value) return;
|
if (user == value)
|
||||||
|
return;
|
||||||
|
|
||||||
user = value;
|
user = value;
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,10 +186,13 @@ namespace osu.Game.Users
|
|||||||
{
|
{
|
||||||
[Description("Keyboard")]
|
[Description("Keyboard")]
|
||||||
Keyboard,
|
Keyboard,
|
||||||
|
|
||||||
[Description("Mouse")]
|
[Description("Mouse")]
|
||||||
Mouse,
|
Mouse,
|
||||||
|
|
||||||
[Description("Tablet")]
|
[Description("Tablet")]
|
||||||
Tablet,
|
Tablet,
|
||||||
|
|
||||||
[Description("Touch Screen")]
|
[Description("Touch Screen")]
|
||||||
Touch,
|
Touch,
|
||||||
}
|
}
|
||||||
|
@ -77,16 +77,25 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"a")]
|
[JsonProperty(@"a")]
|
||||||
public int A;
|
public int A;
|
||||||
|
|
||||||
public int GetForScoreRank(ScoreRank rank)
|
public int this[ScoreRank rank]
|
||||||
{
|
{
|
||||||
switch (rank)
|
get
|
||||||
{
|
{
|
||||||
case ScoreRank.XH: return SSPlus;
|
switch (rank)
|
||||||
case ScoreRank.X: return SS;
|
{
|
||||||
case ScoreRank.SH: return SPlus;
|
case ScoreRank.XH:
|
||||||
case ScoreRank.S: return S;
|
return SSPlus;
|
||||||
case ScoreRank.A: return A;
|
case ScoreRank.X:
|
||||||
default: throw new ArgumentException($"API does not return {rank.ToString()}");
|
return SS;
|
||||||
|
case ScoreRank.SH:
|
||||||
|
return SPlus;
|
||||||
|
case ScoreRank.S:
|
||||||
|
return S;
|
||||||
|
case ScoreRank.A:
|
||||||
|
return A;
|
||||||
|
default:
|
||||||
|
throw new ArgumentException($"API does not return {rank.ToString()}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user